Improving application startup time using a custom sysimage
It’s important to understand that we’re talking only about the initial response times after the application is started when most of the codebase is JIT compiled. This is known in Julia parlance as time to first plot. Once the initial compilation is completed, the application will run and respond very fast, which is a great feature for web applications that can run for weeks and months between restarts.
Thanks to the efforts of the Julia stewards and the community, the time to first plot has been going down, and work is being done to allow ahead-of-time compilation for Julia apps. Meanwhile, one of the best solutions available today is to use PackageCompiler.jl
(https://github.com/JuliaLang/PackageCompiler.jl) to create a custom Julia library, called a sysimage, that is optimized for our specific application, to reduce the startup latency of our app.
Technically, this process is about creating a custom sysimage...