Cache parsed components for 10x faster startup (2s → 200ms)
- Fix O(n²) postprocessing: compute_all_deps/io_refs/hash were called per-file (92x for sx app). Now deferred to single finalize_components() call after all files load. - Add pickle cache in shared/sx/.cache/ keyed by file mtimes+sizes. Cache stores fully-processed Component/Island/Macro objects with deps, io_refs, and css_classes pre-computed. Closures stripped before pickle, rebuilt from global env after restore. - Smart finalization: cached loads skip deps/io_refs recomputation (already in pickle), only recompute component hash. - Fix ~sx-header → ~layouts/header ref in docs-content.sx Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.pyo
|
||||
shared/sx/.cache/
|
||||
.env
|
||||
node_modules/
|
||||
*.egg-info/
|
||||
|
||||
Reference in New Issue
Block a user