Skip to content

Commit d4850b9

Browse files
IanButterworthchristiangnrdtimholy
authored
Apply suggestions from code review
Co-authored-by: Christian Guinard <[email protected]> Co-authored-by: Tim Holy <[email protected]>
1 parent 0863735 commit d4850b9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

doc/src/manual/performance-tips.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,8 +1415,8 @@ julia> @time @eval foo();
14151415
Note that `@time @eval` is better for measuring compilation time because without [@eval](@ref), some compilation may
14161416
already be done before timing starts.
14171417

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
14201420
recommended to use [`PrecompileTools.jl`](https://julialang.github.io/PrecompileTools.jl/stable/) to run a
14211421
"precompile workload" during precompilation time that is representative of typical package usage, which will cache the
14221422
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.
14311431
Keeping the time taken to load the package down is usually helpful.
14321432
General good practice for package developers includes:
14331433

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.
14381435
3. Avoid use of [`__init__()`](@ref) functions unless there is no alternative, especially those which might trigger a lot
14391436
of compilation, or just take a long time to execute.
14401437
4. Where possible, fix [invalidations](@ref) among your dependencies and from your package code.

0 commit comments

Comments
 (0)