Mercurial > hg
view relnotes/next @ 51375:02e7d79edf62
branchmap: use mmap for faster revbranchcache loading
A typical revbranchmap usage is:
- load the entire revbranchmap file into memory
- maybe do a few lookups
- add a few bytes to it
- write the addition to disk
There's no reason to load the entire revbranchmap into memory.
We can split it into a large immutable prefix and a mutable suffix,
and then memorymap the prefix, thus saving all the useless loading.
Benchmarking on some real-world pushes suggests that out of ~100s server-side
push handling revbranchcache handling is responsible for:
* ~7s with no change
* ~1.3s with the change, without mmap
* 0.04s with the change, with mmap
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Wed, 10 Jan 2024 18:58:42 +0000 |
parents | 609a3b8058c3 |
children | e84975e4a2e7 |
line wrap: on
line source
= Mercurial XXX = == New Features == == Default Format Change == These changes affect newly created repositories (or new clones) done with Mercurial XXX. == New Experimental Features == == Bug Fixes == == Backwards Compatibility Changes == * remove the experimental infinite push extension == Internal API Changes == == Miscellaneous ==