Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

File tools start a native helper process per call and send file bytes as Base64 JSON

Open
#306 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
desktop

Research direction

Start in src/main/tools/file_operations.ts, where readProjectFile and changeProjectFiles spawn the file-helper process, and compare with how sandbox-helper keeps a long-lived process and exchanges line-delimited requests. Time one edit before changing anything, since the issue asks for measurement first. Done means either a measured case for the change with a chosen approach (persistent helper or binary framing), or a note that the cost is too small to justify it.

Written by the indexing model from the issue text.

Description

performance priority: low severity: low

Problem

Left over from #297 (its third point; the size caps are fixed in 7383b07).

Every readProjectFile and changeProjectFiles call in src/main/tools/file_operations.ts spawns a new file-helper process and sends the before and after bytes as Base64 inside one JSON string, built and parsed on the main thread. With files now capped at 16 MB this cannot exhaust memory, but a large edit still costs a process start plus about 4/3 of the file size in Base64 on each side, and edit_file reads the file and then changes it, so two processes per edit.

Possible fix

  • Keep one file-helper process per project for the session and send it line-delimited requests, like sandbox-helper, restarting it if it exits.
  • Or send file bytes in a length-prefixed binary frame instead of Base64 JSON.

Measure first: if a typical edit spends little time here, this is not worth the extra state.

Dominant language
TypeScript
Stars
2
Forks
2
Avg merge
8h 28m
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PierrunoYT/patch

All issues in PierrunoYT/patch

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.