From: Aaron Smith Date: 2007-06-22T13:58:45+09:00 Subject: Re: Ruby extensions question.. MenTaLguY wrote: > On Fri, 2007-06-22 at 11:49 +0900, Aaron Smith wrote: >> Here are a couple ruby-prof call graphs that illustrate the timeliness >> of mysql VS returning a string > > Yeah, it does indeed look like the serializer is a good candidate for a > C rewrite, which should remove the need for a lot of method calls. > > I was also concerned about RUBYAMF::Util::BinaryString, given its heavy > use of delegation (which is quite expensive in principle), except > looking at the profile it doesn't seem to contribute to the times > anywhere near as much. > > Keep up the good work, > > -mental I've been looking through these profiles a bit more. Look at this line: 33.45 11.50 11.31 11.31 0.00 5159152 0.00 0.00 String#== (a little more than half way down the page). After looking over it more and more, the de/serialization times don't seem that bad, there is a ton of time being spent in the String#== though. 5 million calls? that's nuts. I'm wondering if part of all those calls is from ruby-prof itself. If not, It's strange to me that the == is being called so much. hmm. String#== has the most calls out of any method call in the profile. Do you think the de/serialization times could be noticeably improved? Compared to trying to figure out why the String#== is called so much? Any thoughts? -- Posted via http://www.ruby-forum.com/.