Skip to content

Bound the parser's memory on large repositories #48

Open

Description

@typeweaver

Since #17, analyze parses TypeScript/JavaScript files with oxc-parser. Peak memory grows with the number of parsed files, because the parser frees native memory only after a garbage collection that nothing triggers. On angular/angular, peak RSS rises from about 170 MB to about 370–425 MB (default window) and to about 500 MB with --since 10y (docs/toolchain.md).

Forcing a GC through --expose-gc at runtime was measured and rejected; Node documents changing V8 flags after start as undefined behaviour.

Idea: parse in a worker thread (or a pool) that is recycled after N files, so the native memory is released with the worker.

Done when: peak RSS on angular/angular in the default window stays within about 1.5× the pre-#17 baseline, wall time does not regress, and docs/toolchain.md has the new numbers.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions