Closed ferrolho closed 6 months ago
Converted PR to a draft because there is something wrong, and the tests are not succeeding locally for some reason (even though GitHub CI did not complain).
Converted PR to a draft because there is something wrong, and the tests are not succeeding locally for some reason (even though GitHub CI did not complain).
The issue has been fixed, and the tests are passing locally. Marking PR as ready for review.
The only thing I'm not particularly happy about — and which I was trying to avoid in my first commit — is that now the CoreVisualizer
struct has become a mutable struct.
@rdeits, can I merge this and tag v0.16.1
?
What?
This PR is for adding PrecompileTools.jl as a project dependency. It also adds a new method,
close_server!
, that allows us to close previously-opened servers (along with some minor refactoring to allow it).Why?
Because downstream packages that use MeshCat.jl (e.g., TORA.jl) may open a
Visualiser
during pre-compilation, and from Julia 1.10 onwards, any opened plots/servers/streams need to be closed, otherwiseprecompile
will halt for forever.Reduce TTFX
Using PrecompileTools.jl also allows us to "exercise" parts of MeshCat.jl during pre-compilation in order to reduce the time to first execution (TTFX) in a Julia session. The trade-off for this change is an increased pre-compilation time, proportional to the amount of work done in the "exercising" of the package.
For example, the
src/precompile.jl
I'm proposing currently looks like this:Here's what it changes:
Before
After