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: doc/src/manual/performance-tips.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1415,8 +1415,8 @@ julia> @time @eval foo();
1415
1415
Note that `@time @eval` is better for measuring compilation time because without [@eval](@ref), some compilation may
1416
1416
already be done before timing starts.
1417
1417
1418
-
When developing a package, you may be able to improve the experience of your users with *precompilation*,
1419
-
so that when they use the package the code they use is already compiled. To precompile package code effectively, it's
1418
+
When developing a package, you may be able to improve the experience of your users with *precompilation*
1419
+
so that when they use the package, the code they use is already compiled. To precompile package code effectively, it's
1420
1420
recommended to use [`PrecompileTools.jl`](https://julialang.github.io/PrecompileTools.jl/stable/) to run a
1421
1421
"precompile workload" during precompilation time that is representative of typical package usage, which will cache the
1422
1422
native compiled code into the package `pkgimage` cache, greatly reducing "time to first execution" (often referred to as
@@ -1431,10 +1431,7 @@ may be the case during development of a package.
1431
1431
Keeping the time taken to load the package down is usually helpful.
1432
1432
General good practice for package developers includes:
1433
1433
1434
-
1. Reduce your dependencies to those you really need.
1435
-
2. Consider organizing any extended package functionality that is dependent on particular dependencies into
1436
-
[package extensions](@ref) that can serve optional functionality depending on whether the user's environment (or the
1437
-
package depending on yours) has those particular dependencies.
1434
+
1. Reduce your dependencies to those you really need. Consider using [package extensions](@ref) to support interoperability with other packages without bloating your essential dependencies.
1438
1435
3. Avoid use of [`__init__()`](@ref) functions unless there is no alternative, especially those which might trigger a lot
1439
1436
of compilation, or just take a long time to execute.
1440
1437
4. Where possible, fix [invalidations](@ref) among your dependencies and from your package code.
0 commit comments