[diffs] CodeView Layout & Options Optimizations#718
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d60fd50625
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d60fd50 to
088df82
Compare
088df82 to
45a508d
Compare
45a508d to
e730f08
Compare
Create small reusable utilities for the estimate helper and existing virtual layout code. - Extract or share the `getExpandedRegion` logic currently inside `iterateOverDiff` so expansion math cannot drift. - Add a separator estimate helper that mirrors renderer/CSS behavior. - Keep these helpers pure and independent of `VirtualizedFileDiff` instance state. Separator helper rules: - `simple`: render only when `hunkIndex > 0`; height is `metrics.hunkSeparatorHeight ?? 4`. - `metadata`: render only when `hunkSpecs != null`; height is `metrics.hunkSeparatorHeight ?? 32`. - `line-info-basic`: height is `metrics.hunkSeparatorHeight ?? 32`. - `line-info`: height is `metrics.hunkSeparatorHeight ?? 32`, plus top/bottom spacing based on first/last position. - `line-info`: omit top gap for `isFirstHunk`. - `line-info`: omit bottom gap for `isLastHunk`. - `custom`: estimate like `line-info` unless we decide to force custom separators to be measurement-only later.
e730f08 to
863c86d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a60b37fbb3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d601a30 to
b7fa26b
Compare
|
@codex review |
Went a bit deep on optimizing option and layout changes, especially in more pathological that involved moving from split to unified. These are both performance and memory optimizations.
Results
I would share a video but it's too big for github. Some approximate numbers, the linux diff used to take around 200-300ms when toggling between split and unified. Now it should be sub 40ms. Stilll not as fast as I would like, but usable. Also memory usage i think dropped by 50-100mb in the extreme linux variant with the new shared options logic.