Re: Selections in TreeViewS and efficiency issues



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!

I really hope I am missing something.


--
Matthias Kaeppler




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]