Skip to content

Please improve size.. #258

Description

@matiasdelellis

Following the thread of nextcloud/server#19017

I started to investigate. So download the tarball from the app store. Extract them and analyze it with ncdu.

ncdu 1.14.1 ~ Use the arrow keys to navigate, press ? for help --- /home/matias/Escritorio/maps -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
80,0 MiB [##########] /node_modules 6,8 MiB [ ] /screenshots
4,3 MiB [ ] /js
4,2 MiB [ ] /vendor
1,2 MiB [ ] /l10n
1,2 MiB [ ] /css
1,1 MiB [ ] /appinfo
340,0 KiB [ ] /lib
128,0 KiB [ ] package-lock.json
64,0 KiB [ ] /img
40,0 KiB [ ] /templates
36,0 KiB [ ] COPYING
4,0 KiB [ ] README.md
4,0 KiB [ ] openapi.yml
4,0 KiB [ ] CONTRIBUTING.md
4,0 KiB [ ] CHANGELOG.md
4,0 KiB [ ] AUTHORS.md

At first glance the problem is in node_modules, but also, you can avoid adding the screenshots folder since them is not necessary for installation. .. and keep in mind that these files are not understandable and add weight completely. 😅

openapi.yml and package-lock.json although they do not add weight they can also be avoided.

ncdu 1.14.1 ~ Use the arrow keys to navigate, press ? for help --- /home/matias/Escritorio/maps/vendor/lsolesen/pel/test ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/..
1,8 MiB [##########] /imagetests 1,1 MiB [##### ] /images
68,0 KiB [ ] /broken_images
16,0 KiB [ ] ConvertTest.php
8,0 KiB [ ] ReadWriteTest.php
8,0 KiB [ ] DataWindowTest.php
8,0 KiB [ ] AsciiTest.php
4,0 KiB [ ] MisplacedExifTest.php
4,0 KiB [ ] NumberTestCase.php
4,0 KiB [ ] PelEntryUndefinedTest.php
4,0 KiB [ ] Bug3017880Test.php
4,0 KiB [ ] NumberRationalTest.php
4,0 KiB [ ] NumberSRationalTest.php
4,0 KiB [ ] Tags1Test.php
4,0 KiB [ ] GH16Test.php
4,0 KiB [ ] PelJpegMarkerTest.php
4,0 KiB [ ] PelTagTest.php
4,0 KiB [ ] PelEntryWindowsStringTest.php
4,0 KiB [ ] GH21Test.php
4,0 KiB [ ] IfdTest.php
4,0 KiB [ ] PelEntryVersionTest.php
4,0 KiB [ ] PelFormatTest.php
4,0 KiB [ ] BrokenImagesTest.php
4,0 KiB [ ] PelEntryUserCommentTest.php
4,0 KiB [ ] GH77Test.php
4,0 KiB [ ] NoExifTest.php
4,0 KiB [ ] README.md
4,0 KiB [ ] NumberSLongTest.php
4,0 KiB [ ] NumberSShortTest.php
4,0 KiB [ ] NumberLongTest.php
4,0 KiB [ ] NumberSByteTest.php
4,0 KiB [ ] NumberShortTest.php
4,0 KiB [ ] NumberByteTest.php

I don't know if this library is necessary, but at least you can avoid the test images. 😉

Last example:

ncdu 1.14.1 ~ Use the arrow keys to navigate, press ? for help --- /home/matias/Escritorio/maps/node_modules/mapbox-gl/dist -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/..
7,1 MiB [##########] mapbox-gl-dev.js 3,6 MiB [##### ] mapbox-gl-unminified.js.map
2,9 MiB [#### ] mapbox-gl.js.map
2,6 MiB [### ] mapbox-gl-csp.js.map
2,1 MiB [## ] /style-spec
1,5 MiB [## ] mapbox-gl-unminified.js
1,5 MiB [## ] mapbox-gl-csp-worker.js.map
728,0 KiB [# ] mapbox-gl.js
652,0 KiB [ ] mapbox-gl-csp.js
352,0 KiB [ ] mapbox-gl-csp-worker.js
36,0 KiB [ ] mapbox-gl.css
4,0 KiB [ ] mapbox-gl.js.flow
4,0 KiB [ ] mapbox-gl-dev.js.flow

The file mapbox-gl-dev.js seems that it is not being used. and is the largest within the code.

[matias@localhost maps]$ grep -r -i mapbox-gl-dev.js .
./appinfo/signature.json: "node_modules\/mapbox-gl\/dist\/mapbox-gl-dev.js": "d566e1a8f482ec815bd041882db298559bb497d0c7808cfc76772142e1b9ec7318fe2166eb04329aeb9c521a70f0cd6b101e33c4e7312c65a683be4a58c1dbd1",
./appinfo/signature.json: "node_modules\/mapbox-gl\/dist\/mapbox-gl-dev.js.flow": "3ab3ecdd53c00aa4a4e2d473dc139ccb1562b8a81984e65d45deefc32cffe511aa54a09fff389ca80f12c9f9a5993188fe97efe44040987e3abcb77171442f9c",
./node_modules/mapbox-gl/dist/mapbox-gl-dev.js:	"build-flow-types": "cp build/mapbox-gl.js.flow dist/mapbox-gl.js.flow && cp build/mapbox-gl.js.flow dist/mapbox-gl-dev.js.flow",

Well.. you can continue searching with using the ncdu tool..
Knowing the code you can know better what you can avoid. 😉

Thanks for tha app.. 😬
Regards,
Matias

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions