Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bundle_benchmark

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bundle_benchmark

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Bundle Benchmark

:gem: Because loading gems can take longer than you think

bundle_benchmark
............................................................[DONE]

Gem                            Time(sec)     Pct %
--------------------------------------------------
rails                             2.4161     26.9%
mongoid                           0.9279     10.3%
fog                               0.7707      8.6%
newrelic_rpm                      0.5839      6.5%
geocoder                          0.3578      4.0%
delayed_job                       0.3162      3.5%
bitly                             0.2703      3.0%
sass                              0.2651      3.0%
tire                              0.2592      2.9%
--------------------------------------------------
Total                             4.8583    100.0%

Forked from this awesome gist by Pan Thomakos

Installation

gem install bundle_benchmark

No need to add it to your Gemfile.

Use It

In your project directory, run:

bundle_benchmark

To benchmark a specific Gemfile, run:

BUNDLE_GEMFILE=~/Projects/project_n/Gemfile bundle_benchmark

To only require certain groups - like Rails does - do

# default rails development groups
BUNDLE_GROUPS=default,development,assets bundle_benchmark

Now What?

Read this article

http://iain.nl/getting-the-most-out-of-bundler-groups

The Results

I was able to reduce gem load time from 12.1 seconds to 6.7 seconds - over 5 seconds!

Here’s what I did:

  1. Added :console group like the article above suggested

  2. Commented out ruby-prof, oink, and debugger when not in use

  3. Moved newrelic_rpm and turbo-sprockets-rails3 to :staging, :production groups

  4. Removed unused gems

Bonus

script/rails console # or server, etc

is faster than

bundle exec rails console

Try it yourself

FAQs

Package last updated on 08 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc