sapling/eden/mononoke/server/context
Stanislau Hlebik 609c2ac257 mononoke: add another optimization for getbundle
Summary:
D23599866 (54d43b7f95) added an optimization for getbundle that reduces cpu usage when a new
commit with log generation number is added. I.e. the case like this

```
O
|
O
..
   O <- new commit, low generation number
   |
  ...
```

Unfortunately this optimization doesn't help with the case where a new repo is
merged into master

```
O  <- also new commit, but generationo number is high!
| \
..  O <- new commit, low generation number, but it's not in "heads" parameter
    |
    |
    O
  ...
```

The merge commit actually has a high generation number, but it's p2 has a low
generation number, so it causes the same issue with high cpu usage.

This diff adds a second optimization ( :( ) that should help with the shortcoming of the first one. See comments for more details.

Reviewed By: ikostia

Differential Revision: D23824204

fbshipit-source-id: 8f647f1813d2662e41325829d05def633372c140
2020-09-24 07:52:40 -07:00
..
benchmark Manual synchronization of fbcode/eden and facebookexperimental/eden 2020-02-11 11:42:43 +01:00
src mononoke: add another optimization for getbundle 2020-09-24 07:52:40 -07:00
Cargo.toml mononoke: deprecate preamble in favor of metadata 2020-09-15 10:28:38 -07:00