- Jun 19, 2023
-
-
Pierre-Yves David authored
We no longer us the capabilities as a side way to passe argument to the `clonebundle commands`
-
Pierre-Yves David authored
The old wire command does not take argument so we need a new command. We make that new command take argument to prepare it for the future (like narrow support).
-
Pierre-Yves David authored
This make things clearer around the inline clone bundle tests.
-
Pierre-Yves David authored
The current naming is very clone centric, since then, the url scheme was moved to a more generic wording to make room for other use-cases (e.g. pull bundles). We apply the same logic to the internal API and, very important prior to the release, to the wire protocol command.
-
- Jun 17, 2023
-
-
Pierre-Yves David authored
Since the case was dealt with sooner (see XXX), we no longer need to deal with it in this part of the code.
-
- Apr 20, 2023
-
-
Jason R. Coombs authored
-
- Apr 17, 2023
-
-
Jason R. Coombs authored
-
- Jun 12, 2023
-
-
Raphaël Gomès authored
It's useful in certain automated workflows to make sure we recurse in directories whose name conflicts with files in other revisions. In addition it makes it possible to avoid building a potentially costly regex, improving performance when the set of files to match explicitly is large. The benchmark below are run in the following configuration : # data-env-vars.name = mozilla-central-2018-08-01-zstd-sparse-revlog # benchmark.name = files # benchmark.variants.rev = tip # benchmark.variants.files = all-list-filepath-sorted # bin-env-vars.hg.flavor = no-rust It also includes timings using the re2 engine (through the `google-re2` module) to show how much can be saved by just using a better regexp engine. Pattern time (seconds) time using re2 ----------------------------------------------------------- just "." 0.4 0.4 list of "filepath:…" 1.3 1.3 list of "path:…" 25.7 3.9 list of patterns 29.7 10.4 As you can see, Without re2, using "filepath:" instead of "path:" is a huge win. With re2, it is still about three times faster to not have to build the regex.
-
- Jun 17, 2023
-
-
Pierre-Yves David authored
-
- Jun 20, 2023
-
-
Pierre-Yves David authored
That changeset lost its topic for unknown reason and ended up being picked by some automation. So I backout it previous incarnation until it can get properly reviewed.
-
- Jun 19, 2023
-
-
pierre-yves david authored
We add a large warning and an explicit abort. Both can be disable through config, but neither are explicitly documented. If any user exists I really want them to get in touch with the community.
-
- Jun 13, 2023
-
-
Raphaël Gomès authored
`users` is unmaintained, with the maintainer apparently MIA. `whoami` is a popular crate that does simple wrapping of platform-specific calls. This makes the overhead from using `blackbox` lower. It used to be up 10ms on slower hardware for both calls, now down to <1ms which is always good.
-
- Jun 12, 2023
-
-
Raphaël Gomès authored
`ouroboros` has a fundamental soundness problem that, while not applicable today, could become applicable given new compiler optimizations.¹ `self_cell` is a crate that accomplishes a lot of the same things that `ouroboros` did while remaining sound (that is, unless a new soundness issue is discovered) by not assuming as much about the memory layout of the program. `self_cell` has been scrutinized heavily in the past few months by very competent people, some from the compiler team and has shown no weaknesses for a while, with a 1.0 stable release coming out a couple months ago. Our internal API is exactly the same, this is just an implementation detail. To reiterate, no actual soundness issue was found with our use of `ouroboros`, but there might be evolutions of `rustc` (or even a future separate compiler) that could generate unsound code. [1] https://github.com/joshua-maros/ouroboros/issues/88
-
- Jun 02, 2023
-
-
Pierre-Yves David authored
This give use free tree manifest support in the process.
-
Pierre-Yves David authored
We already have a revlog type that everybody use. So we use that one instead.
-
- Jun 12, 2023
-
-
Pierre-Yves David authored
This is simpler that comparing flag, and we want to remove these flags anyway.
-
- Jun 06, 2023
-
-
Pierre-Yves David authored
We know how long it take to generate, lets check how long it take to apply now.
-
Pierre-Yves David authored
This record the time we take to generate a bundle.
-
- Jun 12, 2023
-
-
Pierre-Yves David authored
This allow to simple setup/teardown outside of the timed section. Especially using object that need context manager, like a temporary files.
-
- Jun 05, 2023
-
-
Pierre-Yves David authored
This is getting important as the v3 protocol will diverge from the v2 protocol.
-
Pierre-Yves David authored
The logic is clearer and can be reused for other commands in the future.
-
- May 18, 2023
-
-
Arseniy Alekseyev authored
Without this, if the cache for a nested directory is in a bad state, it's very hard to repair it.
-
- May 31, 2023
-
-
Arseniy Alekseyev authored
Opening an revlog has a cost, especially if it is inline as we have to scan the file and construct an index. To prevent the associated slowdown, we just do a minimal scan to check that an inline file is still inline, and simply stream the file without creating a revlog when we can. This provides a big boost compared to the previous changeset, even if the full generation is still penalized by the initial gathering of information. All benchmarks are run on linux with Python 3.10.7. # benchmark.name = hg.exchange.stream.generate # benchmark.variants.version = v2 ### Compared to the previous changesets We get a large win all across the board! # mercurial-2018-08-01-zstd-sparse-revlog before: 0.250694 seconds after: 0.105986 seconds (-57.72%) # pypy-2018-08-01-zstd-sparse-revlog before: 3.885657 seconds after: 1.709748 seconds (-56.00%) # netbeans-2018-08-01-zstd-sparse-revlog before: 16.679371 seconds after: 7.687469 seconds (-53.91%) # mozilla-central-2018-08-01-zstd-sparse-revlog before: 38.575482 seconds after: 17.520316 seconds (-54.58%) # mozilla-try-2019-02-18-zstd-sparse-revlog before: 81.160994 seconds after: 37.073753 seconds (-54.32%) ### Compared to 6.4.3 We are still significantly slower than 6.4.3, the extra time is usually twice slower than the extra time we observe on the locked section, which is a quite interesting information. Except for mercurial-central that is much faster. That discrepancy is not really explained yet. # mercurial-2018-08-01-zstd-sparse-revlog 6.4.3: 0.072560 seconds after: 0.105986 seconds (+46.07%) (- 0.03 seconds) # pypy-2018-08-01-zstd-sparse-revlog 6.4.3: 1.211193 seconds after: 1.709748 seconds (+41.16%) (-0.45 seconds) # netbeans-2018-08-01-zstd-sparse-revlog 6.4.3: 4.932843 seconds after: 7.687469 seconds (+55.84%) (-2.75 seconds) # mozilla-central-2018-08-01-zstd-sparse-revlog 6.4.3: 34.012226 seconds after: 17.520316 seconds (-48.49%) (-16.49 seconds) # mozilla-try-2019-02-18-zstd-sparse-revlog 6.4.3: 23.850555 seconds after: 37.073753 seconds (+55.44%) (+13.22 seconds)
-
- May 30, 2023
-
-
Pierre-Yves David authored
We want to know if a file is related to a revlog, but the rest is dealt with differently already, so we simplify things further. as a bonus, this cleanup This provides a small but noticeable speedup. The number below use `hg perf::stream-locked-section` to measure the time spend in the locked section of the streaming clone. Number are run on various repository and compare different steps.: 1) the effect of this patchs, 2) the effect of the cleanup series, 2) current state compared to because large refactoring. All benchmarks are run on linux with Python 3.10.7. ### Effect of this patch # mercurial-2018-08-01-zstd-sparse-revlog # benchmark.name = perf-stream-locked-section before: 0.030246 seconds after: 0.029274 seconds (-3.21%) # pypy-2018-08-01-zstd-sparse-revlog before: 0.545012 seconds after: 0.520872 seconds (-4.43%) # netbeans-2018-08-01-zstd-sparse-revlog before: 2.719939 seconds after: 2.626791 seconds (-3.42%) # mozilla-central-2018-08-01-zstd-sparse-revlog before: 6.304179 seconds after: 6.096700 seconds (-3.29%) # mozilla-try-2019-02-18-zstd-sparse-revlog before: 14.142687 seconds after: 13.640779 seconds (-3.55%) ### Effect of this series A small but sizeable speedup # mercurial-2018-08-01-zstd-sparse-revlog before: 0.031122 seconds after: 0.029274 seconds (-5.94%) # pypy-2018-08-01-zstd-sparse-revlog before: 0.589970 seconds after: 0.520872 seconds (-11.71%) # netbeans-2018-08-01-zstd-sparse-revlog before: 2.980300 seconds after: 2.626791 seconds (-11.86%) # mozilla-central-2018-08-01-zstd-sparse-revlog before: 6.863204 seconds after: 6.096700 seconds (-11.17%) # mozilla-try-2019-02-18-zstd-sparse-revlog before: 14.921393 seconds after: 13.640779 seconds (-8.58%) ### Current state compared to the pre-refactoring state The refactoring introduced multiple string manipulation and dictionary creation that seems to induce a signifiant slowdown Slowdown # mercurial-2018-08-01-zstd-sparse-revlog 6.4.3: 0.019459 seconds after: 0.029274 seconds (+50.44%) ## pypy-2018-08-01-zstd-sparse-revlog 6.4.3: 0.290715 seconds after: 0.520872 seconds (+79.17%) # netbeans-2018-08-01-zstd-sparse-revlog 6.4.3: 1.403447 seconds after: 2.626791 seconds (+87.17%) # mozilla-central-2018-08-01-zstd-sparse-revlog 6.4.3: 3.163549 seconds after: 6.096700 seconds (+92.72%) # mozilla-try-2019-02-18-zstd-sparse-revlog 6.4.3: 6.702184 seconds after: 13.640779 seconds (+103.53%)
-
Pierre-Yves David authored
The dictionary only contains 1 (or 0) entries, we can directly store that information (or None). Moving to a simpler argument passing result in a noticable speedup (because Python) The number below use `hg perf::stream-locked-section` to measure the time spend in the locked section of the streaming clone. Number are run on various repository. ### mercurial-2018-08-01-zstd-sparse-revlog before: 0.031247 seconds after: 0.030246 seconds (-3.20%) ### mozilla-central-2018-08-01-zstd-sparse-revlog before: 6.718968 seconds after: 6.304179 seconds (-6.17%) ### mozilla-try-2019-02-18-zstd-sparse-revlog before: 14.631343 seconds after: 14.142687 seconds (-3.34%) ### netbeans-2018-08-01-zstd-sparse-revlog before: 2.895584 seconds after: 2.719939 seconds (-6.07%) ### pypy-2018-08-01-zstd-sparse-revlog before: 0.561843 seconds after: 0.543034 seconds (-3.35%)
-
Pierre-Yves David authored
A small cleanup before large cleanup in the next patch.
-
Pierre-Yves David authored
This is a first step toward simplifying the walk step.
-
- Jun 12, 2023
-
-
Raphaël Gomès authored
Dirstate-v2 will become the default at some point, which would cause this test to fail. Let's save someone else the headache later.
-
- Jun 08, 2023
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-
Pierre-Yves David authored
Since 6.4, we create a temporary index file to write the split data without overwriting the inline version too early. However, the store encoding does not prevent these new `.i.s` file to collide with a directory with the same name. While the odds for such a collision to happens are fairly low, the collision would prevent Mercurial from working. The store encoding have a mitigation solution in place to prevent such collisions from happening for `.i` and `.d` files, but not for other extensions. We cannot update this encoding scheme to solve the issue since it would diverge from older version of Mercurial. Instead, we create an alternative directory tree dedicated to such files. The use of the `.i` extension combined with store encoding will prevent collisions there.
-
Pierre-Yves David authored
This is about to become more complex, so we gather the logic in a single place.
-
- Jun 05, 2023
-
-
Raphaël Gomès authored
This will help us not fail when a v1 dirstate is present on disk while a v2 was expected (which could happen with a racy/interrupted upgrade).
-
Raphaël Gomès authored
We should fall back to trying dirstate v1 when v2 fails to read.
-
Raphaël Gomès authored
It is closer to the right semantics. I added a docstring to better explain the reasonning. In the next patch(es), I will address the underlying issue of finding the "wrong" version of the dirstate on disk.
-
Pierre-Yves David authored
The code that select delta still has too many oportunity to discard the delta is has been forcibly asked to reuse. However is is fairly easy to use a dedicated fastpath for this case. So we do so. Cleaning other code that tries to enforce that policy will be done on default.
-
- Jun 08, 2023
-
-
Pierre-Yves David authored
This will be useful to access the effect of the delta reuse policy.
-
Pierre-Yves David authored
More debug options never hurts.
-
Pierre-Yves David authored
We are about to make the `if` body bigger, so having only one of them is simpler/
-