[PATCH 4 of 6 frozen-repos] localrepo: ability to obtain a read-only snapshot of a repo

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Nov 22 23:23:24 CST 2015



On 11/21/2015 05:14 PM, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1448154001 28800
> #      Sat Nov 21 17:00:01 2015 -0800
> # Node ID 888c2171adffa8340406b50aae02375f7bef50f4
> # Parent  f559e16232491e44fc4dac6c12872cb2e9164d27
> localrepo: ability to obtain a read-only snapshot of a repo
>
> As part of performing some performance profiling, I noticed that a lot
> of time can be spent resolving repoview.changelog (the changelog must
> be resolved when performing repo[x] for example). The reason is that
> the changelog lookup function needs to validate that the cached set
> of revisions exposed to the view is still accurate. While there are
> comments in repoview.py hinting at future optimizations to this
> code, I think the ideal solution is to avoid having to validate a
> cache altogether.

While I like the idea of having frozen repository, it introduce an 
additional level of complexity (somewhere already not simple) and will 
probably take some time to right and properly performing.

Can we look at way to speed up the cache validation logic (or get a 
better approach for invalidating it, eg: nothing really change until we 
have a transaction).

Speeding this would have a massive impact all across the board without 
changing much of the current architecture.

I'll look at the implementation of the frozen repo more in details later.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list