GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — refactor(core): speed up diff calculation significantly by natewill · Pull Request #20731 · anomalyco/opencode Conversation
|
| const diffFull = Effect.fnUntraced(function* (from: string, to: string) { | ||
| return yield* locked( | ||
| Effect.gen(function* () { | ||
| const catFile = Effect.fnUntraced( |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We can’t use the normal git() helper here because git cat-file --batch needs us to write refs to stdin and read raw stdout bytes back, and the normal helper just treats everything like plain text.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| const out = new Map<string, string>() | ||
| const dec = new TextDecoder() | ||
| let i = 0 | ||
| for (const ref of refs) { |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Each batch entry is either "<ref> missing" for added/deleted files or "<id> blob <byte_size>\n<file_contents>\n".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Derived from #20731. Co-authored-by: Nate Williams <[email protected]>
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[BUG] diff calculation is slow [PERF] /undo /redo really slow on larger repos and/or long histories
There was an error while loading. Please reload this page.