mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 18:34:02 +00:00
Since the UI moved to single-file components, every unit-test process compiled the views it imports from scratch, and the loader ran off-thread (module.register), adding a round trip to every module a test imports, including the ones that are not components. Core's unit tests took about twice as long, and a host running Core's suite on smaller runners passed its CI time limit. register-vue now installs synchronous hooks on the loading thread (module.registerHooks). Compiled components are kept in the system temp directory, keyed by the file's path and text, the Vue version and the loader's own code, so each one compiles once across test processes; the compiler itself loads only on a cache miss. Cached modules run as code, so the directory is used only when it is a real directory owned by the current user and writable by no one else; on Windows it lives in the user's local app data instead of a temp directory that may be shared. The cache never sits inside the package tree, and GEV_VUE_CACHE=0 compiles every time. On four cores the full suite went from 441 s to 240 s from a cold cache.