[PATCH 3 of 3 V2] chgserver: add a config option to preload repo
quark at fb.com
Thu Mar 17 03:59:27 EDT 2016
On 03/17/2016 01:13 AM, Yuya Nishihara wrote:
> But the cached repo would be useless once the repository is modified,
> because the server forks per connection, right?
> I don't think this caching strategy would work well.
There is repo.invalidateall() in commandserver.py. So I guess it is designed to
work, although it needs more attention. From my profiling data. Skipping
reposetup()s seems to be the only way if we want trivial commands like
"hg bookmark" faster.
>> +def _reporoot(repo): + if not repo: + return None + return
>> os.path.realpath(getattr(repo, 'root', None))
> Nit: os.path.realpath(None) raises exception
More information about the Mercurial-devel