4 ms·
It’s not trivial to do, but compiling plots into your sysimg might actually fix that
by cbkeller 6y ago
It’s not trivial to do, but compiling plots into your sysimg might actually fix that
- enriquto 6y agoThanks! Is there a way to compile all installed packages into the sysimage? If so, why isn't that the default?
- cbkeller 6y agoTechnically yes, but then IIRC you’d have to recompile the whole sysimg any time you update any single package, which could get to be a pain. The usual compromise seems to be to include just a handful of your most used packages in the sysimg (say Plots + Revise)
- enriquto 6y ago> you’d have to recompile the whole sysimg any time you update any single package Are there any downsides to this? You never care how long does a system update take. You always care how long do your programs run.
- cbkeller 6y agoI’ve never tried it myself, but can’t think of any reason why it wouldn’t work in principle if you do want to go that route
- Sukera 6y agoThe downside is that PackageCompiler (or SnoopCompile, for that matter) can only pack into the sysimage what it sees. This is usually done by "recording" which methods get called during a session and putting the compiled native code for those into the sysimage. If it's not called during setup, you'll still have dynamic compilation (as for any code that hasn't ever run).