Skip to content
Snippets Groups Projects
Commit 41ba5118 authored by Marco Matthies's avatar Marco Matthies
Browse files

Add scripts for creating a system image to speed up GUI loading

Running PersefoneDesktop with this custom system image, latencies are
reduced as follows:

- startup time of the GUI (until the map is shown): 50s (previously 95s)

- showing the population graph window: <1s (previously multiple seconds)

The system image is created with `sysimg_create.jl`.

To use the system image, run `julia -J sysimg.so desktop.jl`.

The majority of the remaining startup time (45s of 50s) is due to the
initialisation of the Persefone simulation.  This might be reduced by
further improving persefone-model.
parent 78c42fd6
No related branches found
No related tags found
No related merge requests found
...@@ -6,3 +6,5 @@ examples ...@@ -6,3 +6,5 @@ examples
# environment. # environment.
Manifest.toml Manifest.toml
# system image used to speed up GUI loading
/sysimg.so
\ No newline at end of file
#!/usr/bin/env julia
import Pkg
Pkg.activate(".")
using PackageCompiler
# Creating the sysimg takes a few minutes and uses around 13GB of RAM.
#
# TODO: currently all GUI functions must be called manually, optimally
# every GUI function is called and a complete simulation is run.
create_sysimage(["Persefone", "CSV", "CxxWrap", "DataFramesMeta", "FileIO", "GLMakie",
"GeometryBasics", "Observables", "QML", "ResumableFunctions", "TableTransforms", "TOML"],
sysimage_path="sysimg.so",
precompile_execution_file="sysimg_precompile.jl")
using PersefoneDesktop
# TODO: currently all important GUI functions that should be
# precompiled must be called manually, and then the GUI must be closed
# manually. It would be good if this could be completely automated.
launch()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment