Generating and Using a custom System Image
To reduce the startup latency of NeuroAnalyzer in Julia, you can create a custom system image (sysimage) using PackageCompiler.jl. This is especially useful for end-users who want faster load times.
Steps to Create and Use a Custom Sysimage
- Clone the Repository
git clone https://codeberg.org/AdamWysokinski/NeuroAnalyzer-misc
cd NeuroAnalyzer-misc
- Generate the Sysimage
Run the provided script to generate the sysimage:
na_generate_sysimage.sh
This script will compile a custom sysimage (NeuroAnalyzer.so) for the current stable release of NeuroAnalyzer.
The sysimage is system- and machine-specific and will not work on different hardware/OS configurations.
- Use the Sysimage
To launch Julia with the custom sysimage, run:
julia -JNeuroAnalyzer.so
This will start Julia with NeuroAnalyzer precompiled, significantly reducing startup time.
- Use NeuroAnalyzer
Once Julia is running with the sysimage, you can use NeuroAnalyzer:
using NeuroAnalyzerKey Notes
- Sysimage Specificity: The generated NeuroAnalyzer.so is tied to your specific machine and OS. Do not share it across different systems.
- Stable Release: The script generates a sysimage for the current stable release of NeuroAnalyzer. If you’re using a development version, you may need to adjust the script.
- Recompile if Updated: If you update NeuroAnalyzer or its dependencies, regenerate the sysimage to ensure compatibility.