Re: Selections in TreeViewS and efficiency issues
- From: Murray Cumming <murrayc murrayc com>
- To: Matthias Kaeppler <nospam digitalraid com>
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Selections in TreeViewS and efficiency issues
- Date: Sat, 09 Apr 2005 19:19:45 +0200
On Sat, 2005-04-09 at 18:56 +0200, Matthias Kaeppler wrote:
> Matthias Kaeppler wrote:
> > 1. How can I avoid this seemingly inefficient behavior? How can I keep
> > it from reiterating over all rows again, if I add more items to the
> > selection?
>
> Looks like I'm the only one who's bothered by this.
> Okay, look again:
>
> Consider a TreeView with 1000 entries. Now select the first entry, hold
> shift and press the down-key to expand the selection downwards till you
> reach the bottom.
> After hitting 'down' for the n-th time, the signal handler has been
> called (n * (n+1)) / 2 times (1 + 2 + 3 + ... + n). That means, after
> selecting 1000 entries this way, the signal handler has been called
> (1000 * 1001)/2 times, that is 500500 times. In words: Over half a
> /million/ times!
This is more appropriate for gtk-list gnome org They would probably
like a real example rather than a theory.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]