Dev server restart time #77298
Labels
enhancement
New value added to drive a business result
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Team:Operations
Team label for Operations Team
Kibana restarts the server in dev mode whenever the server-side code has been changed. However, I felt the server restart is extremely slow (~40sec. on my high-end laptop) and decided to figure a reason. Turned out, Kibana spends 90% of that time compiling js code with babel-register. Several problems need solving:
kibana/src/core/server/plugins/plugin.ts
Line 141 in 744a7b1
In a long term, we might need to reconsider our approach to code compilation in dev: do not compile disabled plugins, speed up compilation, use a single compiler(created Dev server restart time #77298 to discuss) etc.
babel-register
throwing OOM exception when writing cache to the disk during server restart. As a result, the cache is not updated and won't be used when re-compiling. From my testing, it seems that with re-used cache the compilation takes ~15sec, without ~40sec.As a short term solution, we could increase the memory limit for nodejs process in dev mode to ensure babel writes its cache to the disk.
The text was updated successfully, but these errors were encountered: