2 ms·
The biggest problem here is RubyGems which uses "load the specification for every gem you have installed"-approach. 300 gems installed = 300 files read at start
by judofyr 14y ago
The biggest problem here is RubyGems which uses "load the specification for every gem you have installed"-approach. 300 gems installed = 300 files read at startup.
See also https://github.com/judofyr/quickgem https://github.com/judofyr/quickgem for a monkey-patch that speeds startup time up to 4x.
- vidarh 14y ago300 files is nothing. I just strace'd an app I'm playing with that does 145,000 stat calls on startup.... It's in the process of being rewritten to do require_relative whenever possible. As for the gems, it'll probably end up with a hack to "precompile" a list of absolute paths after installation...