Skip to content
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

Reduce gem package size by excluding assets directory #129

Merged
merged 2 commits into from
Dec 26, 2023

Conversation

amatsuda
Copy link
Member

Gem package size of this gem is significantly becoming larger in recent versions.

simplecov-html-0.11.0: 744K
simplecov-html-0.12.0: 1.3M
simplecov-html-0.12.3: 1.3M

This seems to be caused via 0eccc9c which adds a new js library and starts bundling non-minified version of jQuery. That commit at the same time introduces assets compression, and hence that change didn't really impact the actual runtime performance, but resulted in gem package size growth.

However, since asset files under assets directory are used only during precompilation phase and not referenced in users' side, the whole directory can be safely omitted from the gem package.

This patch removes some "development only" files including the assets directory. Result of the installed gem size is as follows:

simplecov-html-0.11.0: 744K
simplecov-html-0.12.0: 1.3M
simplecov-html-0.12.3: 1.3M
simplecov-html-next: 444K

especially, js files under assets dir are very huge, but used only for
precompiling assets, and not referenced in production.
@sferik sferik merged commit 84abac8 into simplecov-ruby:main Dec 26, 2023
8 of 9 checks passed
@amatsuda amatsuda deleted the reduce_gem_size branch December 27, 2023 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants