Extremely slow redraw of 'Connect to ftp server' dialog

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Extremely slow redraw of 'Connect to ftp server' dialog

Post by *Sob »

First, the folders and icons for connections are great, exactly as I hoped for. :)

But the redrawing of connections list is _terribly_ slow. When resizing the dialog window, it eats 100% cpu and it can be clearly seen that it's redrawing the whole list over and over (clears the whole background, then again draws all items one by one). And it does not make more than five updates per second. Even when just selecting different items, there is visible flicker.
Is there any reason why standard TTreeView is not used? It's lightning fast, compared to this.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is a known limitation because TC has to get the icon state dynamically for the connections (secure ftp or not, password encrypted or not).
Author of Total Commander
https://www.ghisler.com
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2ghisler(Author)
Just quick silly question to be sure: is it double buffered to avoid flickering?
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, it's currently not double-buffered.
Author of Total Commander
https://www.ghisler.com
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2ghisler(Author)
I see. I'll cross my fingers then :)
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have already put it on my to do list...
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

pb2: Flickering on resize is gone. The control still redraws noticeably slower compared to system treeview, but it's not that bad.

One little problem remains:

- move mouse to some non-selected item
- press and hold left button -> focus moves correctly
- release the button -> selected item blinks; it seems it's redrawn with white background first and then again with 'selected' color
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

Sob wrote:it seems it's redrawn with white background first and then again with 'selected' color
I think that's how you do that when you want to draw controls by yourself. Such method is not limited to coding only :)
Last edited by fenix_productions on 2009-05-03, 17:05 UTC, edited 1 time in total.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for confirming the fix! Indeed the focus flickering is caused by Windows, it requests an unfocused redraw first, and then a focused redraw...
Author of Total Commander
https://www.ghisler.com
Endeer
Junior Member
Junior Member
Posts: 4
Joined: 2009-05-02, 17:39 UTC

Post by *Endeer »

I'm still experiencing slow redraw, very noticeable it is when doing quicksearch by typing letters. Perhaps allow to disable icons?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Strange, I don't have this problem any more on my slow Pentium III with 866 MHz. How fast is your computer?
Author of Total Commander
https://www.ghisler.com
Endeer
Junior Member
Junior Member
Posts: 4
Joined: 2009-05-02, 17:39 UTC

Post by *Endeer »

Core2Duo 1,8GHz. ATI X1400. Beta 4. WinXP SP2.
I'm not sure whether it really qualifies as "slow", but I don't think I should type three letters and then watch for almost a second how it does two more redraws, or that scrolling with scrollbar should be very "choppy" - I have around 300 connections defined and scrolling though I can see single redraws.

Eats one processor core (~95% when scrolling back and forth).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Wow, that's incredibly slow! Here it's almost instantaneous with my slow PC and active virus scanner!

Maybe you have an extremely slow scanner? Try to disable it temporarily. If it helps, try to exclude wcx_ftp.ini from the scan process.
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

I must also say that the whole thing still "feels" quite slow. The change between PB1 and PB2 was big, so it seemed as problem solved, but after using it a little more, I'd say no.
I don't know if drawing tree in ListBox simply can't be faster or if it's something else.
I spotted one thing: when the dialog is opened, the display of items is not instant. It seems like they are added one by one, at least on the vertical scrollbar it's clearly visible gradual resizing. And the same is when you open the folder. Maybe this is where the slow feel comes from?
Endeer
Junior Member
Junior Member
Posts: 4
Joined: 2009-05-02, 17:39 UTC

Post by *Endeer »

Actually, I don't run any antivirus software. And no, I don't have a virus and am confident about it :) Nor any other software that would scan files. When I check per process CPU usage, around one third is by TC itself and the rest by system, or rather "Inactive system processes", or how it's in English.

I'll try whether I can replicate the problem on any other computer.
Post Reply