Running PackageCompiler isn’t something I’d normally do, but today I have not reproduced the problem, the first run of setup() produced output like this
pluto()
Downloaded artifact: MKL
Starting a Pluto notebook in your browswer.
Please use `HelloJulia.stop()` to interrupt the Pluto notebook server.
julia> From worker 2: [ Info: Loading...
From worker 2: Updating registry at `~/.julia/registries/General.toml`
From worker 2: ┌ Info:
From worker 2: └ Opening http://localhost:1234/open?secret=iuJ0GDAs&path=%2Fhome%2Fandy%2F.julia%2Fdev%2FHelloJulia%2Fnotebooks%2Fpluto_index.jl in your default browser... ~ have fun!
From worker 2: ┌ Info:
From worker 2: │ Press Ctrl+C in this terminal to stop Pluto
From worker 2: └
From worker 2: Gtk-Message: 10:15:24.942: Failed to load module "canberra-gtk-module"
From worker 2: Gtk-Message: 10:15:24.948: Failed to load module "canberra-gtk-module"
From worker 2: Updating registry at `~/.julia/registries/General.toml`
From worker 2: Resolving package versions...
From worker 2: Installed KernelDensity ─ v0.6.4
From worker 2: Updating `~/tmp/jl_hK1hhk/Project.toml`
From worker 2: [13f3f980] + CairoMakie v0.8.10
From worker 2: Updating `~/tmp/jl_hK1hhk/Manifest.toml`
From worker 2: [621f4979] + AbstractFFTs v1.2.1
From worker 2: [1520ce14] + AbstractTrees v0.4.2
From worker 2: [79e6a3ab] + Adapt v3.3.3
...
Then opening a new repl and running pluto (it was fine so tried using CairoMakie)
julia> Pluto.run()
[ Info: Loading...
┌ Info:
└ Opening http://localhost:1235/?secret=0mfAY02w in your default browser... ~ have fun!
┌ Info:
│ Press Ctrl+C in this terminal to stop Pluto
└
Gtk-Message: 10:20:47.712: Failed to load module "canberra-gtk-module"
Gtk-Message: 10:20:47.714: Failed to load module "canberra-gtk-module"
Updating registry at `~/.julia/registries/General.toml`
Resolving package versions...
Updating `~/tmp/jl_DJ5aU2/Project.toml`
[13f3f980] + CairoMakie v0.8.10
Updating `~/tmp/jl_DJ5aU2/Manifest.toml`
[621f4979] + AbstractFFTs v1.2.1
[1520ce14] + AbstractTrees v0.4.2
[79e6a3ab] + Adapt v3.3.3
[27a7e980] + Animations v0.4.1
[67c07d97] + Automa v0.8.2
...
This time all in green with +
instead of compiling again, which is what I would have expected.
Thanks for your help, I think this will require some more investigation on my part. I do recall when shutting things down last night that, even after all julia windows were closed, a julia process was stuck running 100% cpu that I had to kill. Maybe something just got screwed up yesterday and I was so used to slow first-time-to-plot issues that I thought it was all part of the same problem.
Until the workshop yesterday I’d abandoned Pluto as it regularly took over 5 minutes to load a small notebook. I’m going to re-read 5. Creating Packages · Pkg.jl as I think I might have a better understanding now of what’s happening.
I feel like a lot of the getting started tutorials for julia skip over the intricacies of package management, which is understandable, but then people new to julia get bitten, and you can see that the person giving the demonstration is waiting just a few seconds for their notebook to load while yours is taking minutes - anyway, that’s just me griping now.
Is it at all advisable to have a lean general environment (e.g. v1.7) and use specific package environments for each task, even if just trying things out and learning Julia?
If I’ve understood correctly, an update to one package will cause a recompilation to all its dependencies, so maybe there is some good practice of running updates and precompiling your environment again; when you’re off to get a coffee and not when you’re in the middle of a task?
There is a performance tips page in the manual, though that didn’t seem relevant to this kind of problem, is there any general guide for workflows in Julia or is it simple enough to say that when you’ve launched a repl you should keep it open - all my programs and notebooks are a lot faster after the first run?