Skip to content

Commit c44b717

Browse files
committed
remove outdated advice
1 parent 92a1086 commit c44b717

File tree

1 file changed

+2
-68
lines changed

1 file changed

+2
-68
lines changed

docs/src/man/differences.md

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -14,73 +14,7 @@ The rest of this page will list noteworthy differences between ControlSystems.jl
1414
- 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).
1515
- 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.
1616
- 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.
1818

1919

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
21-
```@raw html
22-
<iframe style="height: 315px; width: 560px" src="https://www.youtube.com/embed/ZpH1ry8qqfw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
23-
```
24-
25-
## Precompilation for faster load times
26-
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> @time using 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> @time using 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)]
54-
bodeplot(P)
55-
nyquistplot(P)
56-
plot(step(P, 10))
57-
end
58-
```
59-
60-
Then run the following
61-
```julia
62-
using PackageCompiler
63-
PackageCompiler.create_sysimage(
64-
[
65-
:OrdinaryDiffEq,
66-
:Plots,
67-
:ControlSystems,
68-
];
69-
precompile_execution_file = "precompile_execution_file",
70-
sysimage_path = "sys_ControlSystems_$(VERSION).so",
71-
)
72-
exit()
73-
```
74-
75-
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
81-
```json
82-
"julia.additionalArgs": [
83-
"-J/path_to_sysimage/sys_ControlSystems_<VERSION>.so"
84-
],
85-
```
86-
to `settings.json`.
20+
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

Comments
 (0)