mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Like ctl, the controller and host now compile schema validators on first use instead of at import, which cost about 120 ms per invocation. The Controller and Host classes are only imported by the commands that start them, so config, bootstrap and the other commands no longer load express, ws and the rest of the servers. clusteriocontroller config set goes from 413 ms to 231 ms and clusteriohost config set from 412 ms to 225 ms. The integration tests run the bins, like npx does, instead of the package directories. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 lines
192 B
TypeScript
4 lines
192 B
TypeScript
// This needs to be a separate file due to ECMAScript Modules evaluating code in
|
|
// imported modules before any code in the file that imports it.
|
|
(global as any).lazySchemaCompilation = true;
|