fncbook / fnc

Fundamentals of Numerical Computation text, Julia version for the MATLAB (1st) edition.
Other
54 stars 16 forks source link

Building a sysimg for FNC #6

Open jpfairbanks opened 3 years ago

jpfairbanks commented 3 years ago

I noticed that you are suggesting PackageCompiler for accelerating the startup time. I am planning to teach a course with this book during Spring '22 and was planning to make a PackageCompiler script available for my students. From the manual, it looks like we just need the list of packages to include and a script to run.

using PackageCompiler
create_sysimage(["Plots"], sysimage_path="sys_plots.so", precompile_execution_file="precompile_plots.jl")

Do you think that the main test file would be sufficient to exercise all the precompilation needs?

tobydriscoll commented 2 years ago

Did you resolve this to your own satisfaction? While producing the text, I used

gr()
plt = plot(rand(10))
display(plt)
FNC.horner([1.0,2.0],3.0)
FNC.lufact(ones(3,3))
sol = solve( ODEProblem((u,p,t)->u,1.,(0.,1.)))

That was enough to make the startup experience much more pleasant. The tests don't include plots, which are in the top two most responsible (with DiffEq).