Skip to content

perf(tool): reduce edit and read memory overhead - #19008

Closed
thdxr wants to merge 1 commit into
devfrom
perf/tool-memory
Closed

thdxr wants to merge 1 commit into
devfrom
perf/tool-memory

Conversation

@thdxr

@thdxr thdxr commented Mar 24, 2026

Copy link
Copy Markdown
Member

Summary

  • reduce edit tool memory and I/O overhead by removing the redundant post-write reread, reusing pre-split search inputs across replacers, and switching Levenshtein to a rolling-row implementation
  • make read stop after the requested page instead of scanning the rest of the file, and reject oversized image/PDF attachments before base64 encoding them
  • update read tool coverage for the new truncation message and oversized attachment guard

Verification

  • bun test test/tool/edit.test.ts test/tool/read.test.ts
  • bun typecheck

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@rekram1-node

Copy link
Copy Markdown
Collaborator

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:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants