NeuroAnalyzer tutorials: Generating and using sysimage

Due to the nature of Julia compiler, initial startup of NeuroAnalyzer takes several seconds. To speedup the process, creating a custom sysimage for reduced latency using PackageCompiler.jl is recommended. This method is recommended for end-users of NeuroAnalyzer.

In order to create the custom sysimage, first clone the repository:

git clone https://codeberg.org/AdamWysokinski/NeuroAnalyzer-misc
cd NeuroAnalyzer-misc

Next, generate the sysimage:

na_generate_sysimage.sh

The sysimage is located in the current directory as NeuroAnalyzer.so.

Please note, that the sysimage of the current stable release will be produced. Also, keep in mind that sysimage is system- and machine-specific and will not work in machines with different hardware/OS.

To use the generated sysimage, run:

julia -JNeuroAnalyzer.so

Then use the NeuroAnalyzer as usual:

using NeuroAnalyzer

Benchmarks

Vanilla sysimage with recompilation:

@time using NeuroAnalyzer
200.100963 seconds (192.47 M allocations: 11.527 GiB, 1.85% gc time, 6.23% compilation time: 40% of which was recompilation)

Vanilla sysimage without recompilation:

@time using NeuroAnalyzer
85.793703 seconds (192.44 M allocations: 11.527 GiB, 4.40% gc time, 14.30% compilation time: 40% of which was recompilation)

Custom sysimage:

@time using NeuroAnalyzer
0.003870 seconds (10.55 k allocations: 614.109 KiB)