[PATCH] 1321 (partial): run Python pretxnchangegroup hooks before disk flush
Jesse Glick
Jesse.Glick at sun.com
Fri Jan 16 14:46:50 CST 2009
Matt Mackall wrote:
> writing the temporary index may be expensive, we don't want to do it
> unless necessary
While the laziness is good, writing the temporary changesets would be less expensive if you only wrote the _delaybuf to the special file, rather than making a copy of the
entire changelog. For example, in my project, 00changelog.i is currently around 7.4Mb, whereas the incremental addition from a typical push is only going to be a few Kb.
The patch might be more cumbersome, though, as revlog.py would likely need to change to accommodate a split index file. And of course people worried about performance are
well advised to use only internal hooks to begin with, which would not incur the overhead.
There is still the hypothetical incompatibility to an internal hook which winds up forking an Hg process (even the same version). But I think this would fall in the
"silly" category.
More information about the Mercurial-devel
mailing list