mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 09:07:40 +00:00
* perf(dev): size the dev server's Rolldown runtime for many parallel instances ~93% of idle electron-vite RSS is Rolldown's native mimalloc arenas. The dev wrapper now gives electron-vite MIMALLOC_PURGE_DELAY=0 and 4 Rolldown/Rayon threads; a serve-only renderer plugin strips exactly those keys before Electron spawns, so dev Orca's terminals never inherit them. * fix(dev): add the runtime-env plugin only when the dev wrapper set its keys Keeps createDevServeConfig returning the renderer config unchanged when there is no port and nothing to strip, as electron-vite-output-contract pins. --------- Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
14 lines
444 B
TypeScript
14 lines
444 B
TypeScript
import type { Plugin } from 'vite'
|
|
import { removeDevRolldownRuntimeEnv } from '../scripts/dev-rolldown-runtime-env.mjs'
|
|
|
|
/** electron-vite starts Electron after the renderer server, so this runs once Rolldown has sized its pools. */
|
|
export function createDevRolldownRuntimeEnvPlugin(): Plugin {
|
|
return {
|
|
name: 'orca-dev-rolldown-runtime-env',
|
|
apply: 'serve',
|
|
config() {
|
|
removeDevRolldownRuntimeEnv(process.env)
|
|
}
|
|
}
|
|
}
|