3
在努力加快我的测试套件我型材,并得到以下
为什么Kernel#需要占用我45%的时间?
Total: 1445 samples
650 45.0% 45.0% 1171 81.0% Kernel#require
261 18.1% 63.0% 261 18.1% garbage_collector
47 3.3% 66.3% 168 11.6% Kernel.load
39 2.7% 69.0% 82 5.7% Module#class_eval
27 1.9% 70.9% 817 56.5% ActiveSupport::Dependencies::Loadable#load_dependency
25 1.7% 72.6% 58 4.0% Enumerable#find
25 1.7% 74.3% 25 1.7% Module#constants
20 1.4% 75.7% 1171 81.0% Kernel#gem_original_require
19 1.3% 77.0% 19 1.3% File.file?
18 1.2% 78.3% 415 28.7% Kernel.require
.
.
.
从这个答案Why is Kernel#require taking such a big chunk of my application's resources?余吨,似乎这种预期,但我在这里数量庞大着实吃了一惊。这是真的吗?我们不能做任何事吗?
这是一个Rails应用程序或非Rails应用程序? – 2011-12-13 21:42:33
这是一个Rails应用程序。 – 2011-12-14 11:27:57