Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#306 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
desktop

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
2
Fork
2
Merge medio
8h 28m
PR unite (30g)
26

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PierrunoYT/patch

Tutte le issue di PierrunoYT/patch

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.