Page 1 of 4

listbox versus listview

Posted: 2007-05-27, 10:38 UTC
by icfu
I have read for the Xth time a statement by ghisler that he uses a listbox control in the file panels because it would be "clearly faster" than a listview control, like in Explorer.

I cannot confirm that for XP SP2, not even on my antique PII boxes!

The listview control in Explorer is definetely more fluent here than the listbox in TC and even more important than that: It doesn't flicker when scrolling, everything is smooth.

Indeed, there are some file managers out there which have a very slow listview control (Speed Commander for example), so I can only assume that ghisler's statement about speed is either based on bad examples or outdated, maybe true for WinDOS?

So, what are your experiences? Do you see any differences?

If you add an answer:
What OS are you using and how powerful is your box?

Icfu

Re: listbox versus listview

Posted: 2007-05-27, 11:17 UTC
by m^2
icfu wrote:I have read for the Xth time a statement by ghisler that he uses a listbox control in the file panels because it would be "clearly faster" than a listview control, like in Explorer.

I cannot confirm that for XP SP2, not even on my antique PII boxes!

The listview control in Explorer is definetely more fluent here than the listbox in TC and even more important than that: It doesn't flicker when scrolling, everything is smooth.

Indeed, there are some file managers out there which have a very slow listview control (Speed Commander for example), so I can only assume that ghisler's statement about speed is either based on bad examples or outdated, maybe true for WinDOS?

So, what are your experiences? Do you see any differences?

If you add an answer:
What OS are you using and how powerful is your box?

Icfu
I also use XP SP2. Pentium D @2.9. Explorer definitely feels faster.

Posted: 2007-05-27, 15:14 UTC
by sqa_wizard
2icfu: May I ask what you are talking about ?

Yes, I have read the statement by Ch. Ghisler, but do you mean the speed of :
- scrolling through a list of 30000 files
- sorting those by date
- selecting files
- what else ?

Furthermore you cannot simply compare the listview of MS Explorer (which is an integrated part of the OS) with any control of a separate program ...

Posted: 2007-05-27, 17:03 UTC
by Alextp
He can. Explorer's Listview is an ordinary control and Ghisler's one can be even faster (well here Explorer's is faster)

Posted: 2007-05-27, 19:29 UTC
by Lefteous
On Windows XP and higher the listview control allows application developers to enable double buffering. This is used for example by Explorer and SpeedCommander. According to Microsoft this should reduce flickering compared to previous listview implementations (<=Windows 2000).

Posted: 2007-05-27, 22:18 UTC
by icfu
@sqa_wizard:
Yes, I have read the statement by Ch. Ghisler, but do you mean the speed of :
- scrolling through a list of 30000 files
- sorting those by date
- selecting files
- what else ?
In short: All of that!

To give you an example about the "speed" of TC, I made a test with 30000 files with very simple names: 1 to 30000.
Time needed to switch the sort direction of the name column on a PII 333:

TC: 25 seconds
Explorer: 4 seconds
SpeedCommander: 38 seconds

The more files TC listbox has to work with, the more extreme the differences are...

@Alextp and Lefteous:
Thanks for additional information.

Icfu

Posted: 2007-05-27, 23:23 UTC
by petermad
2icfu
I made a test with 30000 files with very simple names: 1 to 30000.
Can you provide an app. that can generate those files?

Posted: 2007-05-27, 23:44 UTC
by icfu
Sure:
http://icfu.totalcmd.net/Temp/create_30000_files.exe

Copy to a directory of your choice and execute. Files will be created in that directory.

Icfu

BY HAND !

Posted: 2007-05-27, 23:48 UTC
by Clo
2petermad

:) Hello Peter !

• Let be bold ! Make them one by one using Shift+F4 ! :lol:   :lol:

{End of the joke }

• It should be interesting to know the average and total sizes…
… and then, to test with different machines having various CPU-clock speeds.

:mrgreen: FR
Claude
Clo

Posted: 2007-05-28, 08:26 UTC
by Flint
There's no need to write an EXE program. :) Simple CMD-script will do the job:

Code: Select all

for /L %%i in (1,1,30000) do copy nul %%i.tmp
1. If run directly from the command line, replace double % signs with single ones.
2. If you need files of size greater than zero, replace "copy nul %%i.tmp" with "fsutil file createnew %%i.tmp <size>", where <size> is either fixed size in bytes, or e.g. %%i itself (to create files of different sizes).

P.S.
Entities should not be multiplied beyond necessity.
© William of Ockham

:lol:

Posted: 2007-05-28, 08:50 UTC
by icfu
It will do the job but it isn't that fast, not only because you forgot @echo off and 1>nul and 2>nul. ;)

Icfu

Posted: 2007-05-28, 09:30 UTC
by Flint
icfu wrote:It will do the job but it isn't that fast, not only because you forgot @echo off and 1>nul and 2>nul.
The programmer is a man who within 5 hours writes a program which within 5 minutes does the job you would have done yourself within 30 minutes. :)

I compared times and found that creating 10000 files by my methode with all the output shown takes 27 seconds; with all the output hidden - 25 seconds. So, don't overestimate the output timings, in WinXP it's implemented in quite an effective way.
Of course, EXE will be faster, but will the summary time of (downloading the program + copying it to the temporary folder + running it) be smaller than executing the script I wrote above? I'm not sure.

In any case, I didn't pretend for an universal and best solution. I just wrote one more variant for doing the same job, which can be done with only the standard Windows tools. ;)

Posted: 2007-05-28, 09:39 UTC
by petermad
2icfu
Thank you.

Here's my test results with 30000 files - changing the sort direction of the Name column:
TC: 3 - 3.5 secs
Explorer: 2 secs

Testing with 60000 files:
TC: 7 secs
Explorer: 3 secs

When TC has been out of focus with that big filelist displayed and it gets the focus back, it takes about 2 secs before TC is ready for input - no such thing occurs with Explorer.

If I change in and out of the 60000 files directory, it takes 7 seconds to generate the filelist in BOTH TC and Explorer.

Testet on a 3.0 GHz PC.

Tested on both FAT and NTFS partitions - I am not sure but it seems to be a tiny bit faster on NTFS in both TC and Explorer.

Test in various views (Full, Brief, Custom Columns views using various content plugins)

Posted: 2007-05-28, 10:39 UTC
by icfu
@petermad:
Thanks for your detailed report, looks like you have exactly reproduced my findings, even the delay when TC gets focus back which I hadn't mentioned.
Tested on both FAT and NTFS partitions - I am not sure but it seems to be a tiny bit faster on NTFS in both TC and Explorer.
Yep, this is because these tiny files are stored directly in the MFT (Master File Table) on NTFS and don't waste any regular disk space.

@Flint:

Code: Select all

Loop, 30000
FileAppend, , %A_Index%
5 seconds I'd say, not 5 hours, otherwise you are right of course. ;)
I had tried a batch too at first, but with "fsutil file createnew" instead which was terribly slow. Your version is definetely faster.

Icfu

Posted: 2007-05-28, 10:59 UTC
by petermad
looks like you have exactly reproduced my findings
Well, it seems that TC is about 8 times faster on my PC compared to yours, whereas Explorer is only 2 times faster on my PC.

Or said in another way: your difference between TC and Explorer is about 6 times, while my difference is only 2 times.

I'm still not sure what to wote, because with more "normal" sized directories TC "feels" faster especially when navigating into the folder tree for the first time in a session - but that might be due TC's use of treeinfo.wc