You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit de6269e
Browse filesBrowse the repository at this point in the historyBrowse files
improvement(perf): eight verified cuts to workspace cold-load JavaScript
Second round of load-time work, adversarially verified for strict behaviour
preservation before implementation. Each item is an import-graph fix — none
changes what renders, when it renders, or any data path:
- knowledge/[id] imported one modal through the [documentId] components
barrel, which also exports the chunk editor and therefore js-tiktoken
(~2.5 MB gzip of BPE tables) on a route that never edits chunks. Deep
import.
- prepareBlockState moved out of stores/workflows/utils.ts into its own
module. It is the only function there needing the block registry and the
generated tool-outputs artifact (~476 KB gzip), and utils.ts is reached by
the persistent shell — so every workspace route paid for a canvas-only
helper, including a module-scope JSON.parse of a 5.4 MB string.
- ExecutionSnapshot (the frozen-canvas modal) is now React.lazy behind its
interaction gates, per the code-splitting procedure in sim-imports.md:
deep import, dead barrel re-export deleted, sibling imports in log-details
deepened to break the parent->child barrel cycle, local Suspense at both
render sites. Takes ~7.6 MB of source off logs hydration.
- The api contracts barrel no longer re-exports ./tools, ./selectors, ./v1,
or ./demo-requests (~58 KB gzip of Zod schema construction on every
route). Zero importers used the barrel path for any of them.
- createCsvParser (streaming csv-parse, a Node Transform) moved to a
server-only module so its stream polyfill leaves client bundles.
Deliberately not re-exported from the lib/table barrel.
- jszip is dynamically imported at both remaining static call sites (skill
zip extraction, pptx parsing) — both already-async, user-triggered paths,
mirroring the existing pattern in workflow import-export.
- The desktop local-filesystem tool executor is dynamically imported in
use-chat; a chunk-load failure now reports an error completion so the
server-side tool call settles instead of hanging.
Production build, JS downloaded before the load event, vs the previous
release:
/home 4.44 -> 3.87 MB /logs 4.44 -> 3.64 MB
/knowledge 4.22 -> 3.68 MB /tables 4.17 -> 3.61 MB
/files 4.68 -> 4.10 MB /w/[id] 4.80 -> 4.67 MB
/home total after idle prefetch: 8.15 -> 5.52 MB
The lazy snapshot was exercised end-to-end: its chunk loads when a log
detail opens (off the route's cold path, warm before the View Snapshot
click) and the modal renders without errors. Boundary baseline retightened.
0 commit comments