Skip to content

Commit

Permalink
less precompilation if no GUI attached
Browse files Browse the repository at this point in the history
  • Loading branch information
ufechner7 committed Oct 27, 2024
1 parent c6b7287 commit ee7dfe3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/KiteViewers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ end
@compile_workload begin
# all calls in this block will be precompiled, regardless of whether
# they belong to your package or not (on Julia 1.8 and higher)
viewer=Viewer3D(true; precompile=true)
segments=se().segments
state=demo_state_4p(segments+1)
update_system(viewer, state, kite_scale=0.25)
close(viewer.screen)
if haskey(ENV, "DISPLAY")
viewer=Viewer3D(true; precompile=true)
update_system(viewer, state, kite_scale=0.25)
close(viewer.screen)
end
nothing
end
end
Expand Down

0 comments on commit ee7dfe3

Please sign in to comment.