From: Steve V Date: 2005-04-12T11:24:55+09:00 Subject: Re: Rails Scripts Slow? > > Can you profile it? (might be able to pass -r profile ?) Apologies to the group if multiple versions of this message came through. I'm assuming I exceeded some maximum byte threshold when attaching the whole profiling. The profile is attached. The offender appears to be #toplevel(which only appears once in the whole profile). To possibly save some time I have pasted below the #toplevel line, as well as surrounding lines. 0.00 22.12 0.00 4 0.00 0.00 SOAP::SOAPExternalReference#method_added 0.00 22.12 0.00 1 0.00 0.00 ActiveRecord::Base#configurations 0.00 22.12 0.00 3 0.00 0.00 XSD::XSDByte#method_added 0.00 22.12 0.00 3 0.00 0.00 ERB::Compiler#initialize 0.00 22.12 0.00 1 0.00 0.00 ##initialize 0.00 22.12 0.00 14 0.00 0.00 File#exists? 0.00 22.12 0.00 1 0.00 0.00 Float#** 0.00 22.12 0.00 48 0.00 7.48 OptionParser#search 0.00 22.12 0.00 2 0.00 8.00 Class#class_inheritable_accessor 0.00 22.12 0.00 1 0.00 22094.00 #toplevel 0.00 22.12 0.00 2 0.00 0.00 Gem.ensure_gem_subdirectories 0.00 22.12 0.00 7 0.00 0.00 IO#close 0.00 22.12 0.00 2 0.00 0.00 Rails::Generator::Spec#class_name 0.00 22.12 0.00 1 0.00 0.00 Kernel.untaint 0.00 22.12 0.00 1 0.00 0.00 String#rstrip 0.00 22.12 0.00 1 0.00 672.00 Rails::Generator::Manifest#replay 0.00 22.12 0.00 1 0.00 0.00 SOAP::Mapping::TypedArrayFactory_#initialize 0.00 22.12 0.00 1 0.00 0.00 Kernel.method_added 0.00 22.12 0.00 3 0.00 0.00 SOAP::Mapping::DateTimeFactory_#method_added 0.00 22.12 0.00 9 0.00 0.00 SOAP::Mapping::Factory#method_added 0.00 22.12 0.00 4 0.00 0.00 OptionParser#separator So I guess the question is... What the heck does #toplevel do? In my case, what is it doing that it's not supposed to? Thanks, Steve