-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: smartlog at HEAD is slower than v0.5.0 #625
Comments
Hi @mlcui-google, thanks for reporting and bisecting! I was able to reproduce the slow-down on my machine. It looks like the regression is in the time it takes to calculate |
FWIW I haven't noticed the normal smartlog being much slower (though I'm working on much smaller repos), but I also just encountered a significant performance issue with This command: It spends around 15s in this state:
This seems to be related to the issue I just ran into over on #619. In that case, some crude debugging seems to indicate that the smartlog is processing commits that seem well out of scope. In that case, it seems like it was walking commits from 10 months ago that are only reachable by remote ref and have no business in my smartlog. 😄 Note that displaying a smartlog with |
@claytonrcarter you should also try with |
Interestingly, a similar performance regression occurs when executing the query mentioned in #624 (comment) (this is in my Chromium checkout):
The latter takes much longer with this loading message: |
As reported in #625, commit c90b52f introduced a performance regression. It's not clear to me why queries like `ancestors(X)` are slow in this case. In my experimentation, the result was often a single-span commit set, which should be fairly quick to compute and process for other operations (such as `intersection`). Nonetheless, avoiding that query seems to improve the speed of evaluating various revsets.
@mlcui-google can you try #631 and see if it resolves the performance issue? |
Yes - in fact, it's even faster than v0.5.0! Using hyperfine to measure:
|
@mlcui-google Nice! Thanks again for reporting 🙂. |
As reported in #625, commit c90b52f introduced a performance regression. It's not clear to me why queries like `ancestors(X)` are slow in this case. In my experimentation, the result was often a single-span commit set, which should be fairly quick to compute and process for other operations (such as `intersection`). Nonetheless, avoiding that query seems to improve the speed of evaluating various revsets.
Description of the bug
git-branchless smartlog
is quite quick on v0.5.0 under the Chromium repository:but it is much slower at HEAD:
It spends 1.4-1.5 seconds with this loading message:
Evaluating revset: union(union(draft(), branches()), @)
A bisect showed c90b52f as the culprit commit.
Expected behavior
git-branchless smartlog
is fast (<0.2s runtime).Actual behavior
git-branchless smartlog
is slow (>1s runtime).Version of
rustc
No response
Automated bug report
Software version
git-branchless 0.5.0 (v0.3.6-nixos.0-605-gc90b52f)
Operating system
Linux 5.18.16-1rodete4-amd64
(rodete is Google's Rolling Debian Testing release.)
Command-line
~/git/git-branchless/target/release/git-branchless bug-report
Environment variables
Git version
Hooks
Show 6 hooks
Hook
post-commit
Hook
post-merge
Hook
post-rewrite
Hook
post-checkout
Hook
pre-auto-gc
Hook
reference-transaction
Events
Show 5 events
Event ID: 370, transaction ID: 63 (message: checkout)
WorkingCopySnapshot { timestamp: 1667793444.537032, event_tx_id: EventTransactionId(63), head_oid: ee48c934d22c5905048203dfb0053e3dd74ebce8, commit_oid: NonZeroOid(e103bfe874692da2aa80d04219714bcdfdbfa36b), ref_name: Some(ReferenceName("refs/heads/redacted-ref-0")) }
RefUpdateEvent { timestamp: 1667793445.520311, event_tx_id: EventTransactionId(63), ref_name: ReferenceName("HEAD"), old_oid: ee48c934d22c5905048203dfb0053e3dd74ebce8, new_oid: 6894f271131b48e50afa69d5ab91e806f9854535, message: None }
Event ID: 368, transaction ID: 61 (message: checkout)
WorkingCopySnapshot { timestamp: 1667793424.9770467, event_tx_id: EventTransactionId(61), head_oid: d191dad369fb881ce73a859febb6704d3bb95305, commit_oid: NonZeroOid(423f1cd04163d42049a110d68014700c3493fba1), ref_name: Some(ReferenceName("refs/heads/redacted-ref-1")) }
RefUpdateEvent { timestamp: 1667793425.944182, event_tx_id: EventTransactionId(61), ref_name: ReferenceName("HEAD"), old_oid: d191dad369fb881ce73a859febb6704d3bb95305, new_oid: ee48c934d22c5905048203dfb0053e3dd74ebce8, message: None }
Event ID: 367, transaction ID: 60 (message: hook-post-checkout)
RefUpdateEvent { timestamp: 1667793075.8793802, event_tx_id: EventTransactionId(60), ref_name: ReferenceName("HEAD"), old_oid: 106ec001bf94906f443f15904867343528c50354, new_oid: d191dad369fb881ce73a859febb6704d3bb95305, message: None }
Event ID: 360, transaction ID: 59 (message: hook-post-rewrite)
RewriteEvent { timestamp: 1667793048.3937514, event_tx_id: EventTransactionId(59), old_commit_oid: 21477bf7bbe22c4ae875f310cab196fb718b351d, new_commit_oid: f697958be1d6d9121ecd3c41b15a882af22b4a69 }
RewriteEvent { timestamp: 1667793048.3937514, event_tx_id: EventTransactionId(59), old_commit_oid: 2717372cb090f4ef99bef68c4d0bf16bf45771d2, new_commit_oid: 58ad601600caf6db760df0e88c1bbe68c6bdda71 }
RewriteEvent { timestamp: 1667793048.3937514, event_tx_id: EventTransactionId(59), old_commit_oid: b64ae1b6ba18ac5dff50a098e9074240670d4d71, new_commit_oid: 710dc0ee9177424fbd9a86c272a6a1fa8c83914a }
RewriteEvent { timestamp: 1667793048.3937514, event_tx_id: EventTransactionId(59), old_commit_oid: f880f9f898a57867001ef73b5da878587d5b55aa, new_commit_oid: 6894f271131b48e50afa69d5ab91e806f9854535 }
RefUpdateEvent { timestamp: 1667793048.4998088, event_tx_id: EventTransactionId(59), ref_name: ReferenceName("refs/heads/redacted-ref-2"), old_oid: f880f9f898a57867001ef73b5da878587d5b55aa, new_oid: 6894f271131b48e50afa69d5ab91e806f9854535, message: None }
WorkingCopySnapshot { timestamp: 1667793049.48474, event_tx_id: EventTransactionId(59), head_oid: 6894f271131b48e50afa69d5ab91e806f9854535, commit_oid: NonZeroOid(fa63978906ff0ad0d9510b60b74449ff35e88d97), ref_name: None }
RefUpdateEvent { timestamp: 1667793050.7584877, event_tx_id: EventTransactionId(59), ref_name: ReferenceName("HEAD"), old_oid: 6894f271131b48e50afa69d5ab91e806f9854535, new_oid: 106ec001bf94906f443f15904867343528c50354, message: None }
Event ID: 359, transaction ID: 55 (message: post-commit)
CommitEvent { timestamp: 1667793046.0, event_tx_id: EventTransactionId(55), commit_oid: NonZeroOid(6894f271131b48e50afa69d5ab91e806f9854535) }
Version of
git-branchless
No response
Version of
git
No response
The text was updated successfully, but these errors were encountered: