miyucy / faster_rubygems Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rdp/faster_rubygems
A helper to dramatically speedup the time it takes to run a 'require rubygems'
This project forked from rdp/faster_rubygems
A helper to dramatically speedup the time it takes to run a 'require rubygems'
A helper to dramatically speedup the time it takes to load rubygems. i.e. it makes it so that "require 'rubygems'" no longer has to sap valuable time from your life. Speed difference (windows box, lots of gem): $ time ruby examples/require_rubygems_normal.rb real 0m1.109s $ time ruby examples/require_fast_start.rb real 0m0.500s Yea! Finally ruby script startup times that don't spend forever just reloading gem specs every single time... It acts about the same as gem_prelude (prelude is 1.9 only currently) -- adds the paths of the highest version of each gem into your load path so they're ready to be required. It is also good for 1.9 makes script startup faster. To use it with 1.9 do an $ export RUBYOPTS=-rfaster_rubygems somewhere. == installation == $ gem install faster_rubygems == usage == require 'faster_rubygems' at the top of your script. Or 1.9: $ export RUBYOPTS=-rfaster_rubygems 1.8: you can install it to be used by default thus: >> require 'rubygems' >> require 'faster_rubygems/install' # installs faster_rubygems to be use in place of normal rubygems when you do a "require 'rubygems'" # later, to revert back to normal, should you so desire: >> require 'rubygems' >> require 'faster_rubygems/uninstall' If all else fails in this process (it typically works fine), you can reinstall normal rubygems by running setup.rb from within its package. == More Speed Comparisons == For those interested, speed difference example on linux (250 gems): $ time ruby examples/require_rubygems_normal.rb ruby examples/require_rubygems_normal.rb 0.57s user 0.05s system 85% cpu 0.726 total $ time ruby examples/require_fast_start.rb ruby examples/require_fast_start.rb 0.04s user 0.02s system 46% cpu 0.121 total Note also that a few non conforming gems require the use of require 'rubygems' no matter what (they're pretty rare, though--you probably won't run into them, and I'm not aware of any). Related projects: http://github.com/fabien/minigems/tree/master 1.9's gem_prelude.rb http://www.ruby-forum.com/topic/191673 Source/contact: http://www.github.com/rdp/faster_rubygems
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.