From: Victor Shepelev Date: 2006-05-25T22:57:05+09:00 Subject: Re: MethodTracer.rb Re: How use Profiling, a Quick Guide. From: John Carter [mailto:john.carter@tait.co.nz] Sent: Thursday, May 25, 2006 5:28 AM > > On Wed, 24 May 2006, Victor Shepelev wrote: > > > >>> * Look at the top most items in the profile list. Usually they are > >>> standard library functions. Silly things like [] or +... > >>> Ask your self, "What could be calling these thing so often? > >>> Can I make it do it less often? eg. Cache the result etc.) > >> > >> Here can help my Module#add_tracer, described here > >> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/192291 > > > > Coool!! I _like_ it! Let that be a lesson to those who say Ruby can't do > > AOP or Lispish Macros. > > LOVELY! > > It works brilliantly! Just use -rprofile to find the hot spots, the > standard class.method that has been called many many many times and then > mixed in my little MethodTracer.rb > > (Did you know Find.find invokes Kernel.catch once per file/directory?) > > ===MethodTracer.rb======================================================== > ======= [skip] John, it's really cool! May be (as I've mentioned above) we can create "profile hacks" project on rubyforge? Victor.