Open felipecrs opened 21 hours ago
Correction: this is the actual code cache:
❯ ls -lha /tmp/deno-compile-*
-rw-r--r-- 1 felipecrs felipecrs 1.8M Nov 21 14:12 /tmp/deno-compile-pkgx-cc.cache
And the size is not just some KBs, but instead a few MBs. I think it's still very acceptable to be bundled by some applications, but I guess it's a good reason not to do it by default.
Surfing on the new
deno compile --include
-style flags, it would be great if the compiled binary could have its own code cache included.Code cache right now will only cache in the first execution and then reuse it in subsequent ones.
As I had stated here, this new flag would make a lot of sense in ephemeral environments like docker containers, where the first execution is also the only execution, rendering code cache a bit useless in this scenario (to be fair, it should be able to work around the issue by running the application once during
docker build
, but running an application isn't always ok to do).On my tests on some application, the code cache seems very small:
Only 76.27 KB in this example. A negligible size increase considering the whole binary size.
Maybe it should be even made the default?