[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] Re: Performance problem kaddressbook kmail - FYI
From:       Don Sanders <sanders () kde ! org>
Date:       2002-12-20 8:20:15
[Download RAW message or body]

On Friday 20 December 2002 14:18, Don Sanders wrote:
> On Friday 20 December 2002 03:02, Ian Reinhart Geiser wrote:
> > On Thursday 19 December 2002 08:41 am, Ferdinand Gassauer wrote:
> > > Hi!
> > > trying to open an addressbook (3.1) with some 800 entries takes
> > > so much time that I always think that the process crashed as
> > > there is no feedback (busy cursor, icon in the taskbar)
> > > neither.
> > >
> > > Any fix for this ?
> >
> > I have been trying to get time to look at this too.  I by mistake
> > tried to load my contact list for my company into KAB from ACT. 
> > 2k entries kills kab completely.  I basicly had to wack it all
> > and start over.  At that point CPU was not the issue but the fact
> > kswapd was going ape by that point.
> >
> > I tried to play with the ldap backend only to find it even
> > slower, lucky ldap crashes after 10 minutes so i was able to
> > recover.
> >
> > Maby we need to have some better logic to only load the entries
> > that are currently displayed.  Something tells me throwing a 2k
> > entry addressbook all over the place is not going to be easy to
> > use.
> >
> > Irritatingly I could not find a BC way to add incremental loading
> > unless I am missing something.  Ideas?
>
> I've discussed ideas for this in depth here before, here are my
> thoughts on the matter.
>
> First consider QTable it is scalable and can handle huge tables
> consisting of many cells. It does this by lazily filling in cells
> only when they are made visible. In order to show the scrollbars
> the QTable also needs to be told the number of rows and columns in
> the table.
>
> QListView isn't as scalable but it can also lazily fill in cells
> when they are made visible. QListView does need some kind of
> identifier for each listviewitem in order to do this. (QTable can
> just use the row and cell numbers)
>
> So in order for libkabc to take advantage of the scalability of
> these widgets it needs to support something like the following
> interface:
>
> int count(); // number of items in the addressbook
> list<Id> addresseeIds (); // get a list of identifiers for all
> items // in the addressbook
> Addressee addresseeFromId( Id ); // get an address book entry
>
> However it's not quite this simple. KAddressBook has support for
> Resources and Views. A Resource can be some alternative backend for
> storing the addressbook like an LDAP server or database. A View is
> basically a filtered selection, like all address book entries that
> are in a specified category. So we actually need to extend the
> above interface to support these concepts:
>
> int count( Resource, View );
> list<Id> addresseeIds( Resource, View )
> Addressee addresseeFromId( Resource, Id )
>
> Resource should be easy enough, but View might be some work as
> libkabc currently doesn't know anything about KAddressBook Views,
> so there needs to be View objects that libkabc maintains and that
> keep track of which addreesses match the filter criteria for that
> View. (This might require libkabc keeping track of which Addressees
> are in each category).
>
> I think this new interface can be added to libkabc without breaking
> (binary or source) compatibility.
>
> I do see one remaining problem and that is the Card view in
> KAddressBook. This Card View will require work if it is to be made
> scalable like the Default Table View (which is qlistview based
> IIRC). I'm not quite sure how to do that yet.
>
> Any additional thoughts welcome.

Oops, I completely forgot the issue of keys.

It is also necessary to tell to the above functions which field to 
sort by, and to tell the address book which fields to index by (so 
sorting by those fields is quick).

Don.

_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic