Profile and reduce fresh-runtime TypeScript compiler latency (GOL-347) - #134
Draft
noise64 wants to merge 7 commits into
Draft
Profile and reduce fresh-runtime TypeScript compiler latency (GOL-347)#134noise64 wants to merge 7 commits into
noise64 wants to merge 7 commits into
Conversation
Contributor
Author
|
Contributor
Author
|
…l-347-typescript-compiler-profiling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
readFileSyncchunk loops with one private native whole-file read while preserving fd and custom-flag fallbacksWhy
Fresh QuickJS TypeScript compiler jobs spent material time crossing the JS/native boundary for 8 KiB file reads. The controlled profile identified TypeScript import as the selected owner: 1,453 native reads became 68 whole-file reads for the same 10,961,854 bytes.
Five-sample controlled A/B medians:
Compatibility
typescript-compiler-profilingis enabled only for the Agentic TypeScript componentreadFileSyncretains Buffer/string behavior, malformed UTF-8 handling, URL and Buffer paths, fd/custom-flag fallback, and Node-compatible ENOENT/EISDIR metadataValidation
fs_read_file_sync_fast_pathruntime coveragetest_fs_readfilefamilyStack
This draft targets
gol-421-skeleton-clippybecause the profiling work depends on that branch's skeleton/module-loading source state. The base PR's known Rust 1.98 DES3 CBC Clippy correction remains independently gated.