Skip to content

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

Open
thdxr wants to merge 1 commit intodevfrom
perf/tool-memory
Open

perf(tool): reduce edit and read memory overhead#19008
thdxr wants to merge 1 commit intodevfrom
perf/tool-memory

Conversation

@thdxr
Copy link
Member

@thdxr thdxr commented Mar 24, 2026

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

Copy link

@greptile-apps greptile-apps bot left a comment

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.

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.

1 participant