From: "Ara.T.Howard" Date: 2005-06-01T12:02:40+09:00 Subject: Re: Interesting discovery... On Wed, 1 Jun 2005, Austin Ziegler wrote: > I had a user report a slowdown in PDF::Writer. I'm pretty certain I > know where the problem is, but I found something very interesting. > About 3% of the profiled performance of the manual generation (with > Shugo Maeda's new profiler) -- and near 20,000,000 (yes twenty > MILLION) calls -- are calls to Kernel.respond_to?. > > A little digging later, and it looks like 98% of these calls -- or > more -- are in Marshal.dump. That's ... amazing. wow. can you confirm with somthing like def Kernel::respond_to?(*a, &b) # # keep yer own count somehow... # __aliased_respond_to?(*a, &b) end def Marshal::dump(*a, &b) # # keep yer own count somehow... # __aliased_dump(*a, &b) end and see how they scale (linearly/exponentially/etc)? that's so crazy it seems like more investigation might be needed... cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | My religion is very simple. My religion is kindness. | --Tenzin Gyatso ===============================================================================