Repository navigation
Conversation
Add performance test for indexing object methods without rescanning.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Main now contains #1517 and #1526. Please rebase this onto current main and focus the follow-up on the static object-target index. The independent 4,000-method profile on main still spends about 1.82 s in The additional receiver-effect cache drops later escape locations for an unchanged receiver/initializer set. #1517 deliberately keeps those locations while caching only pure syntax expansion. Keeping that existing owner avoids introducing another lifetime/effect-cache rule just to obtain the index improvement; if you retain the effect cache, please demonstrate complete-IR equivalence across multiple capture points, lexical scopes and referenced-binding lifetime changes. A narrow controlled port of the two exact modules matched seven small lifetime cases here, but that is not public CLI/MCP or broad equivalence proof. Please also remove the new hard 2,000 ms assertion: we observed the equivalent assertion from #1517 fail at 2,332.3 ms on the prescribed two-core host, then fixed its test portability in #1526. Keep semantic regression assertions and publish explicit resource-bound timings separately. Existing duplicate-property, dynamic-property, spread and callable-capture workflows should accompany the index-only change. |
|
Superseded by #1537, which is rebased onto current main and contains only the static object-target index change. |
Summary
Fixes #1495.
Avoid quadratic semantic analysis when many object methods return the same reference.
Problem and expected behavior
Resolving each
box.mN()call rescanned the complete object literal, and receiver escape handling repeated the same whole-object effect for every call. A 2,000-method reproduction took about 5.6 seconds locally.Change and scope
Contract and boundary impact
Evidence and regression coverage
Validation performed
npx vitest run src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts— 154 passednpx vitest run --project acceptance tests/acceptance/applications/javascriptReturnedReferences.test.ts— passednpm run check:fast— passednpm run build:cached— passed