Folder sizes - uses one thread only?

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

yaronnir
Member
Member
Posts: 32
Joined: 2005 Jan 25, 17:24

Folder sizes - uses one thread only?

Post by yaronnir »

i have 2 panes opened.

i notice that the folder size calculation thread goes over the left pane first and then goes over the right pane for calculation....

Why using one thread only and not parralel threads simultaneously for each pane?
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

that's a design decision
folder sizes like all disk access operations are best done sequentially
adding more threads will end up delaying everybody (think how slow things are when you first boot windows)
yaronnir
Member
Member
Posts: 32
Joined: 2005 Jan 25, 17:24

Post by yaronnir »

like all disk access operations are best done sequentially
Agree
adding more threads will end up delaying everybody
Disagree


one fault of NTFS is that microsoft did not implement dynamic folder calculation which means a simple FindFirstFile with the WIN32_FIND_DATA should have easily returned folder size , same as it simply does for a single file....

due to that us programmers, encounter with performace against efficiency questions every day :(

Nikos - it is up to you  :)
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

that's why in the real world 2 or more threads fighting for the same disk will end up delaying everybody as i said, no?
yaronnir
Member
Member
Posts: 32
Joined: 2005 Jan 25, 17:24

Post by yaronnir »

I've wrote some code that does folder calculation simultaneously
it is very similar to what i have suggested above

the performance was ok (wasn't much of a perfromance overhead)

but, since your application contains much more logic then mine :)
i guess that putting the 2 threads simultaneously will cause a performance overhead

so i guess the answer is yes..... :D