Large chat room performance again

Mark Doliner mark at kingant.net
Sat Apr 14 23:53:19 EDT 2007


On Sun, 15 Apr 2007 05:00:26 +0200, Fredrik Tolf wrote
> On Sat, 2007-04-14 at 12:27 -0500, Mark Doliner wrote:
> > On Sat, 14 Apr 2007 18:31:44 +0200, Fredrik Tolf wrote
> > > [...]
> > > Is this something Gaim/Pidgin should fix, or do you think I should
> > > report this to the Gtk folks instead?
> > 
> > I don't recommend reporting this to the GTK folks unless you're sure it's a
> > GTK problem.  Have you tried profiling the application using Valgrind's
> > 'Callgrind' tool?
> 
> I have not. I thought of doing so, but I didn't, for two reasons:
> 
> 1. It's already taking up *very* close to 100% CPU without Valgrind, 
> so running under Valgrind I guess it would be so slow that I 
> wouldn't even be able to get useful results. I'm also a bit worried 
> about how much buffer memory would accumulate during that time when 
> it cannot consume all data in time.

Hrm?  Why wouldn't the results be useful?  The number of seconds spent in each
function isn't really important.  The important thing to know is which
functions are taking up the largest percentage of CPU cycles, and how do you
go about optimizing the code so that those functions don't take up so many CPU
cycles.

> 2. I'd probably have to let it grind for a very long to get enough data
> to be visible through all the time spent on startup code.

Yeah, probably.  Just start it up, join a room, then go watch a movie or
something :-)

> #2 is really the greatest problem. Do you happen to know if there's any
> way to turn off callgrind's data collection until Gaim has started up
> completely?

I don't know.  My guess would be that it's not possible, but Valgrind is
pretty high quality, so it wouldn't surprise me if they had a way to do that.

-Mark



More information about the Devel mailing list