Repository navigation
Conversation
atscott
force-pushed
the
perf/ngp-incremental-fingerprinting
branch
2 times, most recently
from
November 11, 2026 23:32
5337381 to
5174eb2
Compare
atscott
force-pushed
the
perf/ngp-incremental-fingerprinting
branch
from
November 11, 2026 23:55
5174eb2 to
a460e6c
Compare
atscott
force-pushed
the
perf/ngp-incremental-fingerprinting
branch
from
November 12, 2026 00:07
a460e6c to
184bce5
Compare
atscott
marked this pull request as ready for review
November 12, 2026 00:09
atscott
force-pushed
the
perf/ngp-incremental-fingerprinting
branch
from
November 12, 2026 00:51
184bce5 to
0c6775f
Compare
…g overhead Derive `Hash` on `AnalysisResult` and its nested wire structs (switching object-form `deferredImports` block maps from `HashMap` to `BTreeMap` for deterministic iteration across metadata and `deferredBlocks`) and hash each result in `FileData::to_wire` using `DefaultHasher` into an optional `fingerprint` field. On the TypeScript side, `HybridCompiler.computeBoundFingerprint` uses `result.fingerprint` when available instead of running `JSON.stringify` and JS hashing over large `resolvedDeclarations` graphs, and `remoteScopeInputs` skips serializing `eagerlyUsedDeclarations` for classes that are not remotely scoped. Record `analysisResult` on `FileAnalysis` during template binding in `prepareFileAnalysisForBinding` and `populateBoundData`, and reuse `FileAnalysis.boundFingerprint` in `processFile` when `analysisResult`, `sourceContent`, and `boundFingerprint` match.
atscott
force-pushed
the
perf/ngp-incremental-fingerprinting
branch
from
November 12, 2026 00:56
0c6775f to
4cd01dc
Compare
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.
This change reduces JS serialization and hashing overhead during incremental
HybridCompilerruns.When compiling components with large dependency metadata,
HybridCompiler.computeBoundFingerprintpreviously ranJSON.stringifyand JS string hashing over the fullAnalysisResult(includingresolvedDeclarations), and computed that fingerprint twice per component file acrossprepareChunkandprocessFile.What changed:
HashonAnalysisResultand its nested wire structs in Rustng-analyze(switchingdeferredImportsblock maps fromHashMaptoBTreeMapfor deterministic ordering) and attach aDefaultHasherdigest as an optionalfingerprintfield duringFileData::to_wire.HybridCompiler.computeBoundFingerprintuses that digest rather than serializing largeAnalysisResultobjects in JS, andremoteScopeInputsskips serializingeagerlyUsedDeclarationsfor classes that are not remotely scoped.analysisResultonFileAnalysisduring template binding inprepareFileAnalysisForBindingandpopulateBoundData, and reuseFileAnalysis.boundFingerprintinprocessFilewhenanalysisResult,sourceContent, andboundFingerprintmatch.