Re: Extending ostree's functionality (adding a metadat index)



On Fri, 30 Aug 2013, Colin Walters wrote:

On Fri, 2013-08-30 at 18:31 +0100, Vivek Dasmohapatra wrote:

Not quite, because the next commit adds the copy of the sizes from the existing
ref into the new commit's size cache, so that committing from multiple refs
still produces a size cache.

Ah, I see.  This is a bit magical though in that any other users of the
API will get invalid sizes unless they know to call that.  I do plan to
convert gnome-ostree at some point over to directly using the API rather
than spawning ostree.

Should just happen automatically when preparing a new commit, but
will check the code paths.

If we to calculate the sizes by walking the tree during commit, that's a
bit unfortunate in archive-z2 because by default we have to actually
open each .filez and read the header.  On the other hand, I think it's
reasonable to assume that someone will toss sufficient RAM at a builder
that the recent files remain in the page cache.

Right, that's why I wanted to avoid this one.

So...I think I like the "obviously correct" approach of calculating
during commit, but if you feel strongly I could be convinced it's worth
having the more complex code to cache during the commit process.

No strong feelings. I'll have a look at the code later in the week
when I have more time again.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]