You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/man/differences.md
+2-68Lines changed: 2 additions & 68 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,73 +14,7 @@ The rest of this page will list noteworthy differences between ControlSystems.jl
14
14
- In Julia, code can often be differentiated using automatic differentiation. When using ControlSystems.jl, we recommend trying [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl/) for AD. An example making use of this is available in [Automatic Differentiation](@ref).
15
15
- In Julia, the source code is often very readable. If you want to learn how a function is implemented, you may find the macros `@edit` or `@less` useful to locate the source code.
16
16
- If you run into an issue (bug) with a Julia package, you can share this issue (bug report) on the package's github page and it will often be fixed promptly. To open an issue with ControlSystems.jl, [click here](https://github.com/JuliaControl/ControlSystems.jl/issues/new/choose). Thank you for helping out improving open-source software!
17
-
- Julia compiles code just before it is called the first time. This introduces a noticeable lag, and can make packages take a long time to load. If you want to speed up the loading of ControlSystems.jl, consider building a system image that includes ControlSystems.jl using [PackageCompiler.jl](https://julialang.github.io/PackageCompiler.jl/stable/). More info about this is available below under [Precompilation for faster load times](@ref)
17
+
- Julia compiles code just before it is called the first time. This introduces a noticeable lag the first time a function is called, and can make packages take a while to load.
18
18
19
19
20
-
If you find other noteworthy differences between ControlSystems.jl and other pieces of control-related software, please consider submitting a pull request (PR) to add to the list above. You can submit a PR by clicking on "Edit on GitHub" at the top of this page and then clicking on the icon that looks like a pen above the file viewer. A two-minute video on this process is available below
In order to make it faster to load the ControlSystems.jl package, you may make use of [PackageCompiler.jl](https://julialang.github.io/PackageCompiler.jl/stable/).
27
-
28
-
!!! warning "For developers"
29
-
If you intend to develop ControlSystem.jl, i.e., modify the source code, it's not recommended to build the package into the system image. We then recommend to build OrdinaryDiffEq into the system image since this package contributes the largest part of the loading time.
30
-
31
-
Building a custom system image can reduce the time to get started in a new Julia session, as an example:
32
-
33
-
- Without system image:
34
-
```julia
35
-
julia>@timeusing ControlSystems
36
-
1.646961 seconds (2.70 M allocations:173.558 MiB, 1.08% gc time, 2.06% compilation time)
37
-
```
38
-
39
-
- With OrdinaryDiffEq and Plots in the system image:
40
-
```julia
41
-
julia>@timeusing ControlSystems
42
-
0.120975 seconds (413.37 k allocations:27.672 MiB, 1.66% compilation time)
43
-
```
44
-
45
-
46
-
To build a system image with ControlSystems, save the following script in a file, e.g., `precompile_controlsystems.jl` (feel free to add any additional packages you may want to load).
47
-
```julia
48
-
using OrdinaryDiffEq # Include this if you want to develop ControlSystems.jl
49
-
using ControlSystems # Include this if you only want to use ControlSystems.jl
50
-
using Plots # In case you also want to use plotting functions
51
-
52
-
# Run some statements to make sure these are precompiled. Do not include this if you want to develop ControlSystems.jl
53
-
for P = StateSpace[ssrand(2,2,2), ssrand(2,2,2, Ts=0.1)]
When you have created a system image, start Julia with the -J flag pointing to the system image that was created, named `sys_ControlSystems_<VERSION>.so`, [more details here](https://julialang.github.io/PackageCompiler.jl/dev/sysimages.html#Creating-a-sysimage-using-PackageCompiler). After this, loading the package should be very fast.
76
-
77
-
!!! warning "Updating packages"
78
-
When you update installed julia packages, the update will not be reflected in the system image until the image is rebuilt.
79
-
80
-
You can make vscode load this system image as well by adding
If you find other noteworthy differences between ControlSystems.jl and other pieces of control-related software, please consider [opening an issue on the github repository](https://github.com/JuliaControl/ControlSystems.jl/issues/new?template=Blank+issue).
0 commit comments