Populating listboxes should be done without intermediate upd

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
now
Member
Member
Posts: 181
Joined: 2006-11-01, 08:34 UTC

Populating listboxes should be done without intermediate upd

Post by *now »

When populating listboxes, constantly updating the display really slows down the whole interaction. It also looks weird when the scrollbar “shoots upwards”. The following article has some coverage on how to avoid it:

http://blogs.msdn.com/oldnewthing/archive/2004/06/10/152612.aspx

And even if it’s suggested that this only matters for hundreds of items, I think you’ll see improvements with far less items in the list.
User avatar
wanderer
Power Member
Power Member
Posts: 1644
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Well, i don't know if Christian will use it but it is certainly helpful to me. I have used LockWindowUpdate in some of my apps. Thanks for the info.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50834
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, I'm already setting redraw to false in the file panels...
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Do you also do this in the tree panels? It seems to me that deleting many directories in a bunch leads to many refrehes.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50834
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I do it separately for each added branch. I'm not sure about deleting, I will check it.
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1644
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

2 now:
Configuration\Options\Refresh: Maybe this is turned on? Try turning it off, then restart TC (i think it's necessary).
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
now
Member
Member
Posts: 181
Joined: 2006-11-01, 08:34 UTC

Post by *now »

Argh! Please excuse my terrible introduction. What I meant was for other listboxes like the “Choose command” dialogs listboxes, or the start menu editor. Really sorry about not being clear. It’s of course very clear to me what I mean, but I sometimes don’t realize that it isn’t going to be clear to other people.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50834
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I see - I don't use it in these cases because there are only a few items, so it's not time-critical. With file lists, there can be several 10'000 items, which would take much longer when redrawing isn't turned off.
Author of Total Commander
https://www.ghisler.com
User avatar
now
Member
Member
Posts: 181
Joined: 2006-11-01, 08:34 UTC

Post by *now »

Yeah, that's true. But you still get that very annoying shooting-scrollbar effect and you can tell that the whole dialog is in pains over the listbox being updated so heavily. Anyway, it's just another one of those interface things I like to complain about...do with it as you will.
Post Reply