Trash spec: directory size cache

David Faure faure at kde.org
Mon Apr 15 14:56:21 PDT 2013


On Monday 15 April 2013 21:40:52 Jerome Leclanche wrote:
> Ah sorry, I thought you wanted to store it in multiple separate files :)

No, TRASH_DIR/directorysizes will contain the multiple lines I showed in my 
email.

> The simple file format is nice however I have a small concern about
> extensibility; any new value added is going to break backwards
> compatibility, unless we specify that additional values may be eventually
> added.

There isn't much to add in order to solve the question 'how big is this 
directory'. No extensibility is needed here.

> Performance-wise, does it really matter that much? There should/will be an
> ini parser because of the trashinfo files anyway.

Yes, parsing 1000 files is really a lot slower than parsing one file.
Due to I/O, and due to cache locality.
The whole point of a cache is to be fast, otherwise we wouldn't be doing this 
in the first place.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the xdg mailing list