[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: for kmail people: a discussion of mail summary files
From: George Staikos <staikos () 0wned ! org>
Date: 2000-05-16 13:05:47
[Download RAW message or body]
On Tue, 16 May 2000, Don Sanders wrote:
> > > Something that takes up a lot of time in KMail when
> > > showing a list of message headers (if not taiking up the most time) is the
> > > cost of operator new. A KMMsgInfo object and a QListViewItem object has to
> > > be constructed for each message header in the list. This means a lot of
> > > calls to operator new which is very slow. I tried to speed this up by
> > > recycling QListViewItems instead of deleting them and creating new ones
> > > this helped a lot but I never really finished this work.
> >
> > Do you use KMMsgInfo::init() ?? I just noticed that the QString arguments
> > misses a "&". E.g. it is "const QString subject" instead of "const QString
> > &subject". Changing that spares a call to the QString-copy operator.
> >
> > (They are missing at other places as well I see...)
>
> I wouldn't think it makes much of a difference since QString is shared
> (reference counted).
It still calls new at least once though, and at least on AIX, new(ie
malloc()) alone causes kernel contention. Best to avoid new whenever
possible. When I was working on Net.Commerce performance I found that the
biggest slowdown on the system was calls to new. Granted this is a different
type of app, but in a folder of 3000+ messages, it can get heavy.
--
George Staikos
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic