Repository navigation
perf(build): record boot.pack from a start from a jar too, so it needs no app.pack - #84
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
The PR extends boot.pack recording to cover program starts from a jar (both by class name with a jar classpath and via cheerpjRunJar/LM_JAR mode), not just from a class folder. This moves a few java.base classes (JarFile, URLClassPath$JarLoader) from app.pack into boot.pack, eliminating the extra app.pack fetch on cold starts from a jar. The build script now creates a hello.jar and records two additional runs; documentation is updated accordingly.
review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict approve
What this changes
boot.packwas recorded from programs run from a class folder only. A program started from a jar, by class name with a jar class path or withcheerpjRunJar, reads a few morejava.baseclasses (java.util.jar.JarFile,URLClassPath$JarLoaderand what they load). Those were injdk/app.pack, so a page fetched all ofapp.packon every cold start from a jar.scripts/build-web.tsnow also records Hello from a jar, both ways, intoboot.pack.record()takes the launcher mode for that.Sizes, gzip -6 as a host serves them:
boot.packjdk/app.packapp.packanywayTests
jdk/app.packon 6 of 6 cold loads (first missURLClassPath$JarLoader.class) and withcheerpjRunJaron 3 of 3 (first missJarFile.class); from a class folder it fetched onlyboot.pack. With this PR, all three ways fetch onlyboot.pack, 3 of 3 cold loads each, with no image read outside it.pnpm typecheckpasses.