[PR #971] [MERGED] perf(javascript): index Promise return-site ownership #2542

Closed
opened 2026-10-17 21:07:21 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/971
Author: @morluto
Created: 10/7/2026
Status: ✅ Merged
Merged: 10/7/2026
Merged by: @morluto

Base: main ← Head: codex/audit-wave3-javascript


📝 Commits (4)

  • 4ff3852 perf(javascript): index promise return ownership lookups
  • 63074a7 Merge remote-tracking branch 'origin/main' into codex/audit-wave3-javascript
  • de862c2 perf(javascript): defer Promise return-site indexing
  • 798c4d1 Merge remote-tracking branch 'origin/main' into codex/audit-wave3-javascript

📊 Changes

2 files changed (+114 additions, -19 deletions)

View changed files

📝 src/domain/javascript/javascriptSemanticAnalysis.promise_ownership.test.ts (+51 -0)
📝 src/domain/javascript/javascriptSemanticPromises.ts (+63 -19)

📄 Description

Promise ownership previously searched the full callable list and then the owner’s return sites for every returned Promise. Build a per-analysis index by callable ID and exact source range instead, preserving first-match behavior and keeping unknown and closure-owned return links unchanged.

Validation and measurements:

  • Nine alternating, paired runs of the compiled public analyzeJavaScriptSemantics API on Node 24.18.0 / macOS arm64. Median within-pair reductions were 10.4% for 3,000 Promise-returning handlers and 11.1% for the 3,000-handler effect-heavy case. Separate baseline/candidate medians were 301.27→275.89 ms and 681.46→592.74 ms, respectively.
  • Every full JSON result matched byte-for-byte for all nine pairs. Result SHA-256 values: Promise-return workload d5f468a1a890a3af9d36b05a0f767b5916ea8bdc03a33377936137062c4bb50f; effect-heavy workload 1dc7e23b2c5d8e6325f900bb6cba865b95355db1ced1d8ec9b3b9133cba0ff2d.
  • The 480,937-byte installed Babel parser control remained exactly equal (39561607a098ea0adb94e714149109c4848ff75e9d1eb2283b610cea7717e96e) and showed no meaningful speedup. Measurements are workload-specific and noisy; no Babel or general JavaScript speed claim is made.
  • 340 semantic-domain tests, npm run build:cached, npm run check:fast, npm run format:check, and npm run docs:check passed.

No live provider verification is relevant to this provider-neutral semantic-analysis change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/971 **Author:** [@morluto](https://github.com/morluto) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/audit-wave3-javascript` --- ### 📝 Commits (4) - [`4ff3852`](https://github.com/morluto/rea/commit/4ff385260980beb3d54c5d6324b1e78a76cd0608) perf(javascript): index promise return ownership lookups - [`63074a7`](https://github.com/morluto/rea/commit/63074a7350ba262b754d1baa6b875264e3e6f4f7) Merge remote-tracking branch 'origin/main' into codex/audit-wave3-javascript - [`de862c2`](https://github.com/morluto/rea/commit/de862c2694c1060f0f506ff42aaa28fe2970bc22) perf(javascript): defer Promise return-site indexing - [`798c4d1`](https://github.com/morluto/rea/commit/798c4d1424b604185bec7cd73dae6884cc740a38) Merge remote-tracking branch 'origin/main' into codex/audit-wave3-javascript ### 📊 Changes **2 files changed** (+114 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/javascriptSemanticAnalysis.promise_ownership.test.ts` (+51 -0) 📝 `src/domain/javascript/javascriptSemanticPromises.ts` (+63 -19) </details> ### 📄 Description Promise ownership previously searched the full callable list and then the owner’s return sites for every returned Promise. Build a per-analysis index by callable ID and exact source range instead, preserving first-match behavior and keeping unknown and closure-owned return links unchanged. Validation and measurements: - Nine alternating, paired runs of the compiled public `analyzeJavaScriptSemantics` API on Node 24.18.0 / macOS arm64. Median within-pair reductions were 10.4% for 3,000 Promise-returning handlers and 11.1% for the 3,000-handler effect-heavy case. Separate baseline/candidate medians were 301.27→275.89 ms and 681.46→592.74 ms, respectively. - Every full JSON result matched byte-for-byte for all nine pairs. Result SHA-256 values: Promise-return workload `d5f468a1a890a3af9d36b05a0f767b5916ea8bdc03a33377936137062c4bb50f`; effect-heavy workload `1dc7e23b2c5d8e6325f900bb6cba865b95355db1ced1d8ec9b3b9133cba0ff2d`. - The 480,937-byte installed Babel parser control remained exactly equal (`39561607a098ea0adb94e714149109c4848ff75e9d1eb2283b610cea7717e96e`) and showed no meaningful speedup. Measurements are workload-specific and noisy; no Babel or general JavaScript speed claim is made. - 340 semantic-domain tests, `npm run build:cached`, `npm run check:fast`, `npm run format:check`, and `npm run docs:check` passed. No live provider verification is relevant to this provider-neutral semantic-analysis change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:07:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2542
No description provided.