mirror of
https://github.com/morluto/rea.git
synced 2026-12-03 21:46:01 +00:00
perf(js/env-state): index chunk/document/bulk-target lookups and fuse Electron IPC/boundary scans (#13554)
This commit is contained in:
1 parent
824a994ad7
commit
f3ec898845
4 files changed
+81
-48
No files matched your search
@@ -963,16 +963,19 @@ const resolveBundlerChunkReference = (
|
||||
if (key === null) return null;
|
||||
const file = context.filesByPath.get(sourcePath);
|
||||
if (file === undefined) return null;
|
||||
const registrations = context.analysis.files
|
||||
.find(({ file: analyzedFile }) => analyzedFile.path === sourcePath)
|
||||
?.javascript?.bundler_registrations.filter(({ runtime, modules }) =>
|
||||
reference.module_runtime === undefined
|
||||
? reference.module_key === null
|
||||
: runtime === reference.module_runtime &&
|
||||
modules.some(
|
||||
({ module_key: moduleKey }) => moduleKey === reference.module_key,
|
||||
),
|
||||
);
|
||||
const registrations = (
|
||||
context.analyzedFilesByPath?.get(sourcePath) ??
|
||||
context.analysis.files.find(
|
||||
({ file: analyzedFile }) => analyzedFile.path === sourcePath,
|
||||
)
|
||||
)?.javascript?.bundler_registrations.filter(({ runtime, modules }) =>
|
||||
reference.module_runtime === undefined
|
||||
? reference.module_key === null
|
||||
: runtime === reference.module_runtime &&
|
||||
modules.some(
|
||||
({ module_key: moduleKey }) => moduleKey === reference.module_key,
|
||||
),
|
||||
);
|
||||
if (registrations === undefined) return null;
|
||||
const candidates = registrations.flatMap(({ runtime }) => {
|
||||
const node = context.chunkNodes.get(
|
||||
|
||||
Reference in new issue
Block a user