Re: clist preformance
- From: Karl Nelson <kenelson ece ucdavis edu>
- To: gtk-devel-list redhat com
- cc: kenelson sequoia ece ucdavis edu
- Subject: Re: clist preformance
- Date: Sat, 11 Mar 2000 13:53:08 -0800
> On Wed, 08 Mar 2000, Ralf Forsberg wrote:
> >Hello,
> >
> >The following program give g_list_nth() quite a
> >workout , it uses 99.95% cpu time for me and
> >finishes in just under one minute (pentium233).
> >
> >It is faster if I set the text directly when adding
> >the rows, but I don't want to do that.
>
> I think using a hash table instead ot the linear
> list would help a lot. I could make a patch if
> wanted; it would (I think) mostly be a
> search-and-replace operation.
>
> Or am I abusing the clist with 20000 rows?
The best solution is just to rewrite all of clist to use
a binary tree as its storage type with a iterator like
Havoc is using for the Tk port. Then looking up items
in the tree would be order log N. Iterating would be
O(1). It would still be slow to do massive changes but
insertion would actually get faster. (No order N for
middle insertions.)
Too bad I have no time to do it.
--Karl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]