From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] Log changes between vdb_metadata.pickle updates
Date: Fri, 07 Nov 2014 12:17:41 -0800 [thread overview]
Message-ID: <545D28E5.7050105@gentoo.org> (raw)
In-Reply-To: <20141107085114.601cd93a.dolsen@gentoo.org>
On 11/07/2014 08:51 AM, Brian Dolbec wrote:
> On Fri, 7 Nov 2014 00:45:55 -0800
> Zac Medico <zmedico@gentoo.org> wrote:
>
>> This adds add support to generate a vdb_metadata_delta.json file
>> which tracks package merges / unmerges that occur between updates to
>> vdb_metadata.pickle. IndexedVardb can use the delta together with
>> vdb_metadata.pickle to reconstruct a complete view of /var/db/pkg,
>> so that it can avoid expensive listdir calls in /var/db/pkg/*.
>> Note that vdb_metadata.pickle is only updated periodically, in
>> order to avoid excessive re-writes of a large file.
>>
>> In order to test the performance gains from this patch, you need to
>> generate /var/cache/edb/vdb_metadata_delta.json first, which will
>> happen automatically if you run 'emerge -p anything' with root
>> privileges.
>> ---
>
> The following code I would like to see either as an independant class
> and file if possible, then just instantiated here in the main vardbapi.
> Looking over the code, I didn't see much use of other class functions.
> This class is already too large in many ways.
Yeah, I definitely want to split it out.
> Also is there a
> possibility this code could be re-used as a generic delta cache
> anywhere else?
Maybe. For example, the PreservedLibsRegistry and WorldSelectedSet
classes both have similarities in the way that encapsulate an on-disk
data store and manage concurrency. Maybe I'll create a helper class that
can be utilized by these classes to manage concurrency with on-disk data
stores.
> Another possibility is moving this code and the aux_cache code to
> another class that the vardbapi class also subclasses. This would move
> all the cache code to a small class easily viewed, edited, maintained.
In this case, I think a helper class will work just fine, so there will
be no need for inheritance.
--
Thanks,
Zac
next prev parent reply other threads:[~2014-11-07 20:17 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 3:28 [gentoo-portage-dev] [PATCH] emerge --search: use description index Zac Medico
2014-10-18 5:59 ` [gentoo-portage-dev] " Zac Medico
2014-10-19 21:51 ` Zac Medico
2014-10-23 8:55 ` Brian Dolbec
2014-10-23 9:22 ` Zac Medico
2014-11-01 6:15 ` Zac Medico
2014-11-01 22:46 ` [gentoo-portage-dev] Zac Medico
2014-11-01 22:46 ` [gentoo-portage-dev] [PATCH 1/5] Add egencache --update-pkg-desc-index action Zac Medico
2014-11-04 9:03 ` [gentoo-portage-dev] [PATCH 1/5 v2] " Zac Medico
2014-11-01 22:46 ` [gentoo-portage-dev] [PATCH 2/5] Add IndexStreamIterator and MultiIterGroupBy Zac Medico
2014-11-02 0:18 ` Zac Medico
2014-11-02 22:50 ` [gentoo-portage-dev] [PATCH 2/5 v3] " Zac Medico
2014-11-03 3:07 ` [gentoo-portage-dev] [PATCH 2/5 v4] " Zac Medico
2014-11-01 22:46 ` [gentoo-portage-dev] [PATCH 3/5] Add IndexedPortdb class Zac Medico
2014-11-04 5:07 ` [gentoo-portage-dev] [PATCH 3/5 v2] " Zac Medico
2014-11-04 20:34 ` [gentoo-portage-dev] [PATCH 3/5 v3] " Zac Medico
2014-11-01 22:46 ` [gentoo-portage-dev] [PATCH 4/5] Add IndexedVardb class Zac Medico
2014-11-05 9:59 ` [gentoo-portage-dev] " Zac Medico
2014-11-07 8:45 ` [gentoo-portage-dev] [PATCH] Log changes between vdb_metadata.pickle updates Zac Medico
2014-11-07 16:51 ` Brian Dolbec
2014-11-07 20:17 ` Zac Medico [this message]
2014-11-08 9:16 ` [gentoo-portage-dev] [PATCH v2] " Zac Medico
2014-11-01 22:46 ` [gentoo-portage-dev] [PATCH 5/5] Add emerge --search-index option Zac Medico
2014-11-01 23:04 ` Zac Medico
2014-11-04 5:42 ` [gentoo-portage-dev] [PATCH 5/5 v3] " Zac Medico
2014-11-04 9:10 ` [gentoo-portage-dev] " Zac Medico
2014-11-04 22:09 ` [gentoo-portage-dev] [PATCH 5/5 v4] " Zac Medico
2014-11-03 21:42 ` [gentoo-portage-dev] Brian Dolbec
2014-11-04 9:19 ` [gentoo-portage-dev] Zac Medico
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545D28E5.7050105@gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox