forked from tobi/delayed_job
-
Notifications
You must be signed in to change notification settings - Fork 954
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't package test files with gem [ci skip]
- Loading branch information
Showing
1 changed file
with
2 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27ce6b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I know most people don't use it, isn't this an intentional feature of ruby gems?
Also the spec directory is roughly 72K uncompressed so this probably doesn't save much.
27ce6b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@albus522 I made recently made the case for changing this default (in Bundler) here: rubygems/bundler#3207 and then applied that changed to all of the projects I help maintain. I just built the gem twice, before and after this commit. The size before is 36,352 bytes; the size after is 29,696 bytes. In absolute terms, a savings of 6,656 bytes (compressed) does not seem very significant but, in relative terms, it reduces the file size by 20% so installation should be about 20% faster (saving both bandwidth and CPU time to uncompress more files). I suspect more than 99% of users who install this gem never run the tests (
rubygems
tooling for this is very poor). Therefore, I think it’s a worthwhile tradeoff to makedelayed_job
installation about 20% faster. If every gem did this, it could significantly improve the performance ofbundle install
or deploying to Heroku, for example. The (less than) 1% of users who want to run the tests can clone the repo but I don’t think that’s the use-case we should optimizing for. Most people who run the tests are doing so because they’re working on a patch or pull request, so they’ll need to clone the repo anyway.Of course, if you disagree, feel free to revert this change.
27ce6b0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@albus522 Reverted in b047b91.