Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Update docs #59

Merged
merged 2 commits into from
Mar 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<tbody>
<tr>
<td>
<a href="https://microsoft.github.io/OpticSim.jl/stable/">
<img src="https://img.shields.io/badge/docs-stable-blue.svg" alt="docs stable">
</a>
<a href="https://microsoft.github.io/OpticSim.jl/dev/">
<img src="https://img.shields.io/badge/docs-dev-blue.svg" alt="docs dev">
</a>
Expand Down
16 changes: 9 additions & 7 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ nothing # hide

![install test image](assets/test_install.png)

### System Image
## System Image

We recommend compiling a custom [Julia system image](https://julialang.github.io/PackageCompiler.jl/dev/sysimages) for the OpticSim.jl package to reduce startup time and improve first-time performance.
If you are using VSCode as your IDE you can create a sysimage by opening the commant palette (CTRL-shift-P), Tasks: Run Build Task, julia: Build custom sysimage for current environment.
If you are using Julia 1.5, we recommend compiling a custom [Julia system image](https://julialang.github.io/PackageCompiler.jl/dev/sysimages) for the OpticSim.jl package to reduce startup time and improve first-time performance.

If you are not using VSCode we have create a julia script file that will build the sysimage. To create the system image simply run:
With VSCode, you can create a sysimage by opening the commant palette (CTRL-shift-P) and selecting `Tasks: Run Build Task, julia: Build custom sysimage for current environment`.

```bash
julia --project=[your_project] -e "using OpticSim.Sysimage; Sysimage.compile()"
Alternatively, we provide a Julia script that will build the sysimage using a representative workload. To do this, activate a Julia environment which has OpticSim installed and run

```julia
include("deps/sysimage.jl")
compile()
```

By default, the sysimage is located in the current working directory. On Linux, it will be called `JuliaSysimage.so`; on Windows, the extension will be `.dll`. A custom path can be used instead which is passed as an argument to `compile()`.
Expand All @@ -56,4 +58,4 @@ To use the generated system image, run Julia with the `--sysimage` flag:
julia --project=[your_project] --sysimage=[path_to_sysimage]
```

If OpticSim.jl is installed in the base project then there is no need for the `--project` flag in the above commands.
If OpticSim.jl is installed in the base project, then there is no need for the `--project` flag in the above command. If your current working directory is OpticSim.jl, then you can use the `--project` flag without needing to specify an argument.