[PATCH 4 of 4 NEW-CONCEPT] track-tags: write all tag changes to a file
Jun Wu
quark at fb.com
Wed Apr 5 23:23:09 UTC 2017
Excerpts from Pierre-Yves David's message of 2017-04-06 01:09:47 +0200:
>
> On 04/05/2017 10:54 PM, Jun Wu wrote:
> > I don't think "writing things that hook *may* need to filesystem" is a good
> > approach. It introduces unnecessary overhead if the hook does not need that
> > information.
>
> I do not find the overhead concerning.
This is from your commit message:
This code is disabled by default as there is still various performance
concerns. Some require a smarter use of our existing tag caches and some
other require rework around the transaction logic to skip execution when
unneeded. These performance improvement have been delayed, I would like
to be able to experiment and stabilize the feature behavior first.
> The thing to keep in mind is that if they are many things to write down,
> this also means many thing changed during the transaction. So the
> overhead is likely minimal. In the tags cases, just updating the various
> tags related cache is going to be much more expensive that writing this
> to disk.
>
> > I think a better way is to have per-hook config to let hooks explicitly
> > declare what they need, before we run them.
>
> I afraid it is too fragile. Forgetting to configure the hook properly
> will be easy and the error will likely pass silently as hook will run
> normally with the same data as if the transaction touched no tags.
Do you mean that a global config option is less fragile?
>
> Cheers,
>
More information about the Mercurial-devel
mailing list