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

Require only necessary concurrent-ruby classes. #22185

Merged
merged 1 commit into from Nov 5, 2015

Conversation

Projects
None yet
5 participants
@jdantonio
Contributor

jdantonio commented Nov 5, 2015

This PR has two changes, which I will happily separate into two PRs if that would be preferred. The two changes are:

  • Using concurrent-ruby v1.0.0.pre5 (upgraded from pre3)
  • Limiting require statements to only load necessary files from concurrent-ruby

1.0.0.pre5

This is the last planned pre-release of concurrent-ruby. There are no new features, just performance improvements and a few refinements to the internal synchronization layer and associated memory model. We hope to release 1.0.0 fairly soon, once our biggest users have upgraded to pre5.

Updated require statements

Based on a recommendation by @jeremy in a concurrent-ruby issue.

For historical reasons, most of c-r doesn't use autoload (though we plan to change this in 2.0). By requiring the entire gem we unintentionally added unnecessary delay to Rails loading. Internally we have been very judicious in using explicit requires in all files. This makes it possible to include only the required c-r components. This update narrows all require statements to the minimum necessary. This should improve load time for all users.

@rails-bot

This comment has been minimized.

rails-bot commented Nov 5, 2015

Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @matthewd (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

rafaelfranca added a commit that referenced this pull request Nov 5, 2015

Merge pull request #22185 from jdantonio/cr-load-time
Require only necessary concurrent-ruby classes.

@rafaelfranca rafaelfranca merged commit 0ae22e5 into rails:master Nov 5, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jeremy

This comment has been minimized.

Member

jeremy commented Nov 5, 2015

🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment