-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove sourcemaps from add-on? #12
Comments
Actually, I revised my script to scan all files in the signed XPI at any depth and try and summarize by file extension:
|
Thanks @pdehaan. This is very useful. Personally I like the idea of having sourcemaps included in the bundle since it makes it more transparent how the executable code links up with the package js bundles, but this can also be verified by users/developers by rebuilding the sourcemaps from source, and having a smaller add-on bundle is of course positive. The difference in compressed package size between package with and without sourcemaps would be an important factor. |
OK, I think I deleted files and re-saved the XPI correctly: # ls -l regre*.xpi
-rw-r--r-- 1 pdehaan staff 2794327 12 Oct 08:23 regretsreporter-1.0.1-fx (1) copy.xpi
-rw-r--r--@ 1 pdehaan staff 4663671 12 Oct 08:21 regretsreporter-1.0.1-fx (1).xpi Or, with prettier file sizes... # ls -lh regre*.xpi
5464 -rw-r--r-- 1 pdehaan staff 2.7M 12 Oct 08:23 regretsreporter-1.0.1-fx (1) copy.xpi
9112 -rw-r--r--@ 1 pdehaan staff 4.4M 12 Oct 08:21 regretsreporter-1.0.1-fx (1).xpi Looks like the XPI from https://addons.mozilla.org/firefox/addon/regretsreporter/ is ~4.4MB, but if I edit the archive, delete the .map files and resave, it drops to ~2.7MB (roughly 1.7MB difference -- or 38.63% of the current XPI filesize is sourcemaps). |
This is very informative, thanks @pdehaan |
I downloaded and extracted the XPI and it looks like the directory is ~12MB (per du -sh).
I did a bit of digging and it looks like we have around 7.2MB of
*.map
files, and around 1.3MB of*.woff*
files.The text was updated successfully, but these errors were encountered: