How to precompile Oxygen?

I am using the web server Oxygen.jl . I use it to call functions using json over http. I want to create a system image to avoid the high time-to-first-reply.

My question:

In the precompile script I want to start Oxygen, it shall serve each possible query once and than it shall shut down. How can I achieve that?

1 Like

You may want to look into Oxygen test sets. There are plenty of examples of how to call the endpoints. You can then collect those for a precompile script and try to compile them with PackageCompiler. I haven’t tried that though.

An alternative I would personally use would be PrecompileTools. With it, you can create a precompile workload and call each endpoint which would then be added to the package image. Note for that to work you would need to use the @oxidise macro.

1 Like