The performance issue would be disk I/O not CPU cycles. First you need the size of the files (read each files i-node) then add those up and possibly save that per folder. Then recursively add up the size of all sub folders. finally each time a file gets modified you'd have to modify all the folders in its full path. So the thing is, is all that worth it?
The performance issue would be disk I/O not CPU cycles.
That's why I suggested moving it to a different thread - for responsiveness' sake, so that the waiting for the disk would be done by that thread, and not the one that runs the user interface.
But of course, if such a feature would be introduced, there should be a way of caching the results and only update the values if needed.
Comments
Re: Folder Size in Tracker list
Other OSes have had this feature (I remember using it in Mac OS 7.1 in fact - and i seem to recall a way to make this work in Windows explorer also)..
The problem tends to be performance I suspect. I would also like to see this feature as an option in OpenTracker :)
Re: Folder Size in Tracker list
Performance problems could, of course, be amended if calculating the folder size happened asynchronously in a separate thread.
Folder Size in Tracker list
This tool performs the function on Windows. Can be somewhat slow when calculating a lot of folders.
http://foldersize.sourceforge.net/
performance problem.
The performance issue would be disk I/O not CPU cycles. First you need the size of the files (read each files i-node) then add those up and possibly save that per folder. Then recursively add up the size of all sub folders. finally each time a file gets modified you'd have to modify all the folders in its full path. So the thing is, is all that worth it?
Re: performance problem.
That's why I suggested moving it to a different thread - for responsiveness' sake, so that the waiting for the disk would be done by that thread, and not the one that runs the user interface.
But of course, if such a feature would be introduced, there should be a way of caching the results and only update the values if needed.