benjamn
benjamn•9mo ago

deno repl start time in container

Why does deno repl take a couple seconds to start in a container the second time around, and starts nearly instantaneously the second time around in the host system? It's on OS X with colima (deno is running on x86) FWIW.
2 Replies
benjamn
benjamn•9mo ago
I use bash to go to my container. using docker stat I can tell it gives up its memory use right away when I exit, which is desired behavior, I just wonder if I could tell it to cache it. Also I wonder if it's caching it in memory on mac. I might have figured most of it out if it's the disk cache.
Deno AI Helper
Deno AI Helper•9mo ago
The documentation does not provide a specific answer to your question about the difference in Deno REPL start times between a container and the host system. However, it's worth noting that Deno's startup time can be influenced by several factors, such as the size of the files being loaded and whether dependencies are cached. In Deno 1.25, for example, an improvement was made to cache the analysis of dependencies, which can significantly speed up startup times after the initial run if your dependencies include large files. This could potentially explain why you're seeing faster start times on the second run in your host system. As for the difference in startup times between the container and the host system, it could be due to differences in how these environments handle caching, file system access, or other factors. Without more specific information, it's difficult to provide a definitive answer. If you continue to experience this issue, it might be helpful to do some debugging to identify any potential bottlenecks. For example, you could try running a simple script that doesn't have any dependencies to see if the startup time is still slower in the container. If it is, this could indicate that the issue is related to the container environment rather than Deno's startup process. 🦕