陈大猫 and Claude Opus 5.5
a8bb5a43fc
perf(main): stop blocking the first window on validator compilation ( #4115 )
...
The main process ran ~1.4 s of synchronous work in registerBridges before the
main window could start loading (app:// assets are served from the main
thread too), even for users without plugins:
- contractValidator: every createDefinitionValidator() built a fresh Ajv
instance and re-registered the 200 KB plugin contract (~17 ms each, ~90 of
them across the plugin host at startup, plus one per plugin view resource
request). Share one Ajv per process, compile each definition on first use
and memoize it; each validator still exposes its own `.errors`.
- distributionSnapshot: compile the three distribution schemas lazily on the
shared contract Ajv instead of a second Ajv at module load (273 ms -> 37 ms).
- pluginBridge: hoist the PluginViewResourceRequest validator to module scope.
- cloudSyncBridge: load webdav / @aws-sdk/client-s3 / @smithy/node-http-handler
on first sync instead of at startup (108 ms -> 4 ms).
- app:// scheme: enable codeCache so V8 reuses compiled renderer bundles
across launches and windows. A same-length in-place edit of the cached entry
chunk runs the new code, so stale cache is not reused after upgrades.
Startup harness (2000 hosts, 10 runs, warm p50): registerBridges 1421 ->
116 ms, plugin host 871 -> 30 ms, renderer ready 2147 -> 723 ms, total memory
923 -> 823 MB.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com >
2026-11-04 02:33:16 -08:00
..
2026-10-27 13:39:03 +00:00
2026-10-28 23:08:31 -07:00
2026-10-26 14:46:30 +00:00
2026-10-28 16:32:41 +08:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-27 11:48:35 +00:00
2026-10-26 05:26:25 +00:00
2026-10-26 23:04:54 +08:00
2026-07-20 22:40:48 +08:00
2026-10-26 23:04:54 +08:00
2026-10-26 23:04:54 +08:00
2026-10-26 17:03:15 +00:00
2026-10-27 02:28:08 +00:00
2026-10-26 17:29:55 +00:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-26 03:25:40 +00:00
2026-10-26 13:15:52 +00:00
2026-10-26 09:13:45 +00:00
2026-07-29 04:35:04 +08:00
2026-07-26 00:39:28 +08:00
2026-10-26 05:26:25 +00:00
2026-07-20 12:39:29 +08:00
2026-07-20 12:39:29 +08:00
2026-11-04 02:33:16 -08:00
2026-08-07 14:40:38 +08:00
2026-08-07 14:40:38 +08:00
2026-10-27 11:25:54 +00:00
2026-07-20 12:39:29 +08:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-07-19 18:04:01 +08:00
2026-10-26 03:10:48 +00:00
2026-10-26 03:10:48 +00:00
2026-10-27 02:28:08 +00:00
2026-10-26 14:37:25 +00:00
2026-11-04 02:33:16 -08:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-08-05 18:43:10 +08:00
2026-08-05 18:43:10 +08:00
2026-10-27 14:56:42 +00:00
2026-10-27 08:49:54 +00:00
2026-10-27 08:49:54 +00:00
2026-10-28 23:08:31 -07:00
2026-10-26 03:25:40 +00:00
2026-10-26 03:25:40 +00:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-27 02:28:08 +00:00
2026-10-27 02:28:08 +00:00
2026-10-27 03:17:53 +00:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-27 03:17:53 +00:00
2026-10-27 02:28:08 +00:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-27 02:28:08 +00:00
2026-07-19 08:22:17 +08:00
2026-07-19 18:04:01 +08:00
2026-07-20 12:39:29 +08:00
2026-07-20 12:39:29 +08:00
2026-10-26 07:03:14 +00:00
2026-10-26 15:00:54 +00:00
2026-10-28 16:32:41 +08:00
2026-10-26 13:15:52 +00:00
2026-10-26 15:21:35 +00:00
2026-07-19 08:22:17 +08:00
2026-07-19 08:22:17 +08:00
2026-10-26 06:01:13 +00:00
2026-10-26 06:01:13 +00:00
2026-10-26 07:03:14 +00:00
2026-10-26 07:03:14 +00:00
2026-10-26 13:15:52 +00:00
2026-10-26 03:25:40 +00:00
2026-10-28 23:08:31 -07:00
2026-07-19 08:22:17 +08:00
2026-07-19 08:22:17 +08:00
2026-10-27 08:49:54 +00:00
2026-10-27 02:28:08 +00:00
2026-10-27 03:17:53 +00:00
2026-10-27 02:28:08 +00:00
2026-10-27 02:28:08 +00:00
2026-10-26 23:04:54 +08:00
2026-10-28 23:08:31 -07:00
2026-11-04 02:33:16 -08:00
2026-10-28 23:08:31 -07:00
2026-10-26 15:00:54 +00:00
2026-10-26 15:00:54 +00:00
2026-10-26 15:00:54 +00:00
2026-10-26 15:00:54 +00:00
2026-10-26 15:00:54 +00:00
2026-10-26 15:00:54 +00:00
2026-10-27 03:17:53 +00:00
2026-10-26 07:18:21 +00:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-26 17:03:15 +00:00
2026-10-27 12:23:21 +00:00
2026-08-05 18:43:10 +08:00
2026-10-26 14:37:25 +00:00
2026-10-26 14:37:25 +00:00
2026-07-19 18:04:01 +08:00
2026-07-19 18:04:01 +08:00
2026-10-28 16:32:41 +08:00
2026-10-28 16:32:41 +08:00
2026-10-28 16:32:41 +08:00
2026-10-28 16:32:41 +08:00
2026-08-05 18:43:10 +08:00
2026-07-20 12:39:29 +08:00
2026-07-26 00:39:28 +08:00
2026-07-23 09:42:47 +08:00
2026-10-27 12:23:20 +00:00
2026-10-26 18:34:59 +00:00
2026-10-26 14:26:41 +00:00
2026-07-19 18:04:01 +08:00
2026-10-26 13:15:52 +00:00
2026-08-06 08:53:03 +08:00
2026-10-27 12:23:20 +00:00
2026-10-26 07:03:14 +00:00
2026-10-28 23:08:31 -07:00
2026-07-29 03:33:00 +08:00
2026-07-29 03:33:00 +08:00
2026-10-26 13:15:52 +00:00
2026-10-26 13:15:52 +00:00
2026-10-26 13:34:59 +00:00
2026-10-27 11:25:54 +00:00
2026-10-26 13:15:52 +00:00
2026-10-26 14:37:25 +00:00
2026-10-26 13:15:52 +00:00
2026-10-26 13:15:52 +00:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-26 17:03:15 +00:00
2026-10-26 17:29:55 +00:00
2026-10-27 02:28:08 +00:00
2026-07-29 03:33:00 +08:00
2026-07-23 09:42:47 +08:00
2026-07-23 09:42:47 +08:00
2026-07-23 09:42:47 +08:00
2026-07-23 09:42:47 +08:00
2026-07-21 10:44:36 +08:00
2026-07-21 10:44:36 +08:00
2026-10-26 18:42:37 +00:00
2026-10-26 18:42:37 +00:00
2026-10-27 02:28:08 +00:00
2026-07-20 12:39:29 +08:00
2026-07-20 12:39:29 +08:00
2026-10-26 11:46:08 +00:00
2026-10-26 12:07:46 +00:00
2026-10-26 23:04:54 +08:00
2026-07-23 09:42:47 +08:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00
2026-10-28 23:08:31 -07:00