Benedikt Meurer wrote: >>>It should be a simple job, which uses one or more threads to determine >>>the size of a directory using opendir(), readdir(), closedir() and lstat(). >> >>You can start with the xfburn code (taken from gnomebaker in fact). I'm >>sure you'll find ways to improve it. > > This is definitely the simplest solution, but it's not suitable for > Thunar, as it uses too much memory when calculating the total size of a > large directory tree.
... but on the other hand, the simplest solution is not always the worst solution. And so, I used your code with a simple trick to not allocate a struct stat in every stack frame (as the thread stack is very limited on several platforms). ;-) http://www.xfce.org/~benny/tmp/thunar-dir-size.png > Benedikt Benedikt _______________________________________________ Thunar-dev mailing list [email protected] http://foo-projects.org/mailman/listinfo/thunar-dev
