[Sugar-devel] [DESIGN] Show file size in Journal

Bert Freudenberg bert at freudenbergs.de
Thu Apr 8 05:02:06 EDT 2010


On 08.04.2010, at 02:42, James Cameron wrote:
> 
> I'd like to see file size described as a row of dots; quantity
> determined by logarithm to base 2 of size in bytes.  ;-)

If you want a logarithmic scale, use numbers. Those are logarithmic (though maybe base 10 would work better than 2).

For a graphical display, it really should be linear. The major use case is probably to free up space. The visual sum of two entries should equal the size of a single entry that occupies the same disk space as the two. Deleting the two would have the same effect as deleting the larger one. 

An implementation problem is that the datastore does not track file sizes. It's not part of the metadata, and there is no stat() call on a Journal entry. Also, on compressing file systems (like JFFS2 on the XO-1) it probably should show physical space taken. And take metadata into account too - many entries have no file but still take up quite some space due to their metadata.

Maybe instead of adding it to the existing Journal views it should be a separate view? If deleting items is indeed the primary use case there could be a view that shows sizes and allows easy deletion ...

- Bert -




More information about the Sugar-devel mailing list