Summary
build_components() in build.py spawns one esbuild subprocess per component sequentially. With 50+ components, build time grows linearly with no parallelism.
Current behavior
for name, component in registry.components.items():
result = bundle_component(...) # sequential subprocess
Proposed solution
Use concurrent.futures.ThreadPoolExecutor (4-8 workers) since Python just waits on esbuild subprocesses. Alternatively, investigate esbuild's multi-entry-point bundling to eliminate per-process spawn overhead.
Also consider incremental builds: compare source file hashes against existing manifest, skip unchanged components.
Context
Found during comprehensive review of feat/pre-compile-bundles-v2 (finding #16).
Summary
build_components()inbuild.pyspawns one esbuild subprocess per component sequentially. With 50+ components, build time grows linearly with no parallelism.Current behavior
Proposed solution
Use
concurrent.futures.ThreadPoolExecutor(4-8 workers) since Python just waits on esbuild subprocesses. Alternatively, investigate esbuild's multi-entry-point bundling to eliminate per-process spawn overhead.Also consider incremental builds: compare source file hashes against existing manifest, skip unchanged components.
Context
Found during comprehensive review of feat/pre-compile-bundles-v2 (finding #16).