mirror of
https://github.com/morluto/rea
synced 2026-10-26 22:28:27 -04:00
perf(javascript): reduce retained semantic analysis allocations (#1601)
Reduce retained semantic allocations and memoize lexical scope ancestry while preserving semantic identities. Refs #1065 and #1563; the complete-directory memory failure remains open.
This commit is contained in:
@@ -179,7 +179,13 @@ const addObjectOperation = (
|
||||
output: JavaScriptSemanticObjectOperation[],
|
||||
): void => {
|
||||
output.push({
|
||||
objectOperationId: `object:${input.kind}:${String(input.node.start ?? -1)}:${String(input.node.end ?? -1)}`,
|
||||
// These high-volume IDs must not retain intermediate concatenations.
|
||||
objectOperationId: [
|
||||
"object",
|
||||
input.kind,
|
||||
String(input.node.start ?? -1),
|
||||
String(input.node.end ?? -1),
|
||||
].join(":"),
|
||||
kind: input.kind,
|
||||
location: range(input.node),
|
||||
ownerCallableId: input.ownerCallableId,
|
||||
|
||||
Reference in New Issue
Block a user