diff options
author | Kaushik Lingarkar <quic_kaushikl@quicinc.com> | 2021-05-12 16:12:27 -0700 |
---|---|---|
committer | Kaushik Lingarkar <quic_kaushikl@quicinc.com> | 2021-05-24 13:00:54 -0700 |
commit | 8bc166b00da5fc74a659b42be779328a9508866b (patch) | |
tree | 5e82588df7ea7ad9ce213d286e459ad0c988424e /org.eclipse.jgit.pgm.test/.classpath | |
parent | 294a99af252c4088f616beb5cb8bbd6d7d976487 (diff) | |
download | jgit-8bc166b00da5fc74a659b42be779328a9508866b.tar.gz jgit-8bc166b00da5fc74a659b42be779328a9508866b.zip |
BatchRefUpdate: Skip saving conflicting ref names and prefixes in memory
Rather than getting all ref names and prefixes and saving them
in memory to perform the check for conflicting names, rely on
RefDirectory.isNameConflicting as it is no longer an expensive
call after it was optimized in Ie994fc.
The old optimization to save ref names and prefixes in memory
was targeted towards making clones faster. With this change,
the clone performance is unaffected when tests were done with
repos containing many(~500k) refs.
Here are few recorded elapsed times for creating 10 branches
using BatchRefUpdate on NFS based repositories with varying
loose refs count. As seen here, this change helps improve the
BatchRefUpdate performance from O(n^2) to O(1).
loose_refs_count with_change without_change
50 241 ms 310 ms
300 263 ms 1502 ms
1k 181 ms 4241 ms
2k 204 ms 6440 ms
9k 158 ms 25930 ms
20k 154 ms 60443 ms
50k 171 ms 135199 ms
110k 157 ms 329450 ms
160k 209 ms 396328 ms
This update improves the Gerrit notedb migration performance
as it uses BatchRefUpdate to write change meta refs similar to
the test performed above.
Change-Id: I853ac6c7feb4b39c3156c01876b38cbd182accfe
Signed-off-by: Kaushik Lingarkar <quic_kaushikl@quicinc.com>
Diffstat (limited to 'org.eclipse.jgit.pgm.test/.classpath')
0 files changed, 0 insertions, 0 deletions