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

List:       kde-devel
Subject:    Re: Kmail slow
From:       Talin <Talin () ACM ! org>
Date:       2000-06-13 7:38:43
[Download RAW message or body]

Don Sanders wrote:

> 1) Using a virtual listbox, which inserts only visible items into the
> list box, so when you scroll new items are filled in as the are seen.

Something that I would _really_ like to see in KDE eventually (which
would solve this problem neatly) is a different listbox class which
allows the list items to be virtualized. Right now if you have your own
tree structure in your app, you have to build a parallel tree structure
of QListItems, and the two trees have to be kept in sync. Instead, if
the list view class had a set of traversal functions to access the list
items (getNextItem, getFirstChild), then a subclass could simply
maintain a single list item, which would be filled in with the data from
the appropriate tree node on a just-in-time basis.

In the case of KMail, this would allow you to construct your tree very
quickly out of data structures that are designed for optimum
performance. It also means that there's only one tree, which belongs to
the application, and the list view knows nothing about the
implementation of that tree. This allows a much cleaner seperation
between UI and functional code.

-- 
Talin (Talin@ACM.org)       "I am life's flame. Respect my name.
www.sylvantech.com/~talin    My fire is red, my heart is gold.
www.hackertourist.com/talin  Thy dreams can be...believe in me,
                             If you will let my wings unfold..."
                               -- Heather Alexander
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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