Skip to content

avoid pack index scans in restack tree rendering - #774

Merged
aviator-app[bot] merged 1 commit into
masterfrom
fix-restack-view-resolve
Jul 10, 2026
Merged

aviator-app[bot] merged 1 commit into
masterfrom
fix-restack-view-resolve

Conversation

@tulioz

@tulioz tulioz commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

the restack view resolved every branch per render frame via ResolveRevision, whose hash-prefix expansion linearly scans the whole pack index in go-git v6 (syscall per entry). on a 2.9M-object repo this turned no-op syncs into ~20s+ of pure CPU. direct ref lookup instead, verified ~112s -> 0.6s on a synthetic repo at that scale

Summary by CodeRabbit

  • Bug Fixes
    • Improved branch revision display in the sequencer interface.
    • Branches now show the abbreviated hash from their current reference, with a fallback for remote-tracking references when needed.

@aviator-app

aviator-app Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator (commit 6473453).


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a555c0cd-d5e9-45bd-a4fe-e6aef49a7776

📥 Commits

Reviewing files that changed from the base of the PR and between df7a738 and 28f083d.

📒 Files selected for processing (1)
  • internal/sequencer/sequencerui/ui.go

📝 Walkthrough

Walkthrough

Branch hash suffix rendering now reads local branch references directly, falls back to remote-tracking references, and uses the first seven hash characters when a reference is found.

Changes

Branch hash suffix lookup

Layer / File(s) Summary
Direct branch reference lookup
internal/sequencer/sequencerui/ui.go
Stack tree rendering checks local and remote branch references directly and appends a seven-character hash suffix when lookup succeeds.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main optimization: avoiding pack index scans during restack tree rendering.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-restack-view-resolve

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request optimizes the View rendering performance in internal/sequencer/sequencerui/ui.go by replacing the slow ResolveRevision call with a direct branch reference lookup (Reference), falling back to the remote tracking branch if the local branch does not exist. This avoids expensive hash-prefix expansion scans on every render frame. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@tulioz
tulioz marked this pull request as ready for review July 10, 2026 18:05
@tulioz
tulioz requested a review from a team as a code owner July 10, 2026 18:05
@aviator-app

aviator-app Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ FlexReview Status

Common Owner: aviator-co/engineering (expert-load-balance assignment)
Owner and Assignment:

  • ✅ aviator-co/engineering (expert-load-balance assignment)
    Owned Files
    • 🔒 internal/sequencer/sequencerui/ui.go

Review SLO: 7 business hours if PR size is <= 200 LOC for the first response.

@aviator-app
aviator-app Bot requested a review from simsinght July 10, 2026 18:05
@aviator-app
aviator-app Bot merged commit 6473453 into master Jul 10, 2026
6 checks passed
@aviator-app
aviator-app Bot deleted the fix-restack-view-resolve branch July 10, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants