playground icon indicating copy to clipboard operation
playground copied to clipboard

Pre-building common libraries in the container

Open milancurcic opened this issue 3 years ago • 2 comments

When first building stdlib, it takes a while for the playground to respond because it takes a while to build stdlib. Building and running programs that use stdlib subsequently is faster because the stdlib is reused, at least for this running session of the backend server.

I wonder if it would be a good idea and easy to implement to pre-build any built-in libraries (for now just stdlib) at docker build stage, rather than at server run time?

milancurcic avatar Sep 03 '22 20:09 milancurcic

That's what I used in the first iteration but as @everythingfunctional stated it would mean that all the libraries are built which won't be useful if the user only imports some selected libraries.

ashirrwad avatar Sep 06 '22 10:09 ashirrwad

If I recall, the initial implementation wasn't pre-building them, but maybe I'm mistaken. This might be worth considering.

everythingfunctional avatar Sep 06 '22 13:09 everythingfunctional