From: gga Date: 2007-02-08T02:35:14+09:00 Subject: Re: Multiple "require" calls -> app slow to start > > Another thing that can help (in general, not only when you're using RubyGems) > is lazy loading using Kernel#autoload. > Similar to autoload, but manually doing it (keeping all of rubygems functionality) is to do your requires within functions that use the library. Thus, rather than doing: require 'mylib' def use_it MyLib.new end Write: def use_it require 'mylib' MyLib.new end Only when use_it is called will the require be executed. If your code never calls use_it, the mylib library is never loaded.