Bundler.setup benchmark #1159

Merged
merged 2 commits into from May 11, 2011

Conversation

Projects
None yet
3 participants
Contributor

pascalh1011 commented May 8, 2011

During development I ran into a sizable problem with startup times and Bundler.setup (even with --frozen enabled), and I was able to isolate this down to a specific gem taking about 65% of the setup time by measuring the time spent requiring each top level dependency in bundler (via the require method). Thought this may be useful to someone else, so just in case I've taken a stab at a pull request. This adds a 'bundle benchmark' task that outputs load times as follows:

$ bundle benchmark
Gem require times as included by bundle:
  * rails (164 ms)
  * will_paginate (7 ms)
  * migrant (300 ms)
  * pickle (1424 ms)
  * capybara (258 ms)
  * database_cleaner (14 ms)
  * geokit (362 ms)
  * texticle (12 ms)

Obviously this is not totally accurate (requiring of gems in gems, etc.) but it was useful enough to point me in the right direction.

Owner

indirect commented May 11, 2011

This is pretty neat. Do you think you could add docs to the manpage describing it, too? Thanks!

indirect merged commit 71a12fe into bundler:master May 11, 2011

ankane commented Dec 7, 2013

Looks like this code was removed in 20dc4b5. However, I can't find anything about the bundler-tools project. Any help would be great!

Owner

indirect commented Dec 8, 2013

Bundler-tools does not yet exist! I would be very excited if you helped create Bundler extensions that aren't in core, though. :) There is more information in bundler/bundler-features#8.

I would be happy to provide guidance and code review for an implementation of Bundler extensions based on that ticket, and create repos inside the Bundler organization to host useful tools like benchmark/profile.

ankane commented Dec 8, 2013

Thanks for the quick response. It looks like writing a plugin system is pretty involved, so I just went with a separate gem for now.

https://github.com/ankane/bundle_benchmark

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