Commit bea9c9c
cache the
Before (in an environment with DifferentialEquations.jl):
```julia
julia> @time Pkg.precompile()
0.733576 seconds (3.44 M allocations: 283.676 MiB, 6.24% gc time)
julia> isfile_calls[1:10]
10-element Vector{Pair{String, Int64}}:
"/home/kc/.julia/juliaup/julia-nightly/share/julia/compiled/v1.12/Printf/3FQLY_zHycD.ji" => 178
"/home/kc/.julia/juliaup/julia-nightly/share/julia/compiled/v1.12/Printf/3FQLY_xxrt3.ji" => 178
"/home/kc/.julia/juliaup/julia-nightly/share/julia/compiled/v1.12/Dates/p8See_xxrt3.ji" => 158
"/home/kc/.julia/juliaup/julia-nightly/share/julia/compiled/v1.12/Dates/p8See_zHycD.ji" => 158
"/home/kc/.julia/juliaup/julia-nightly/share/julia/compiled/v1.12/TOML/mjrwE_zHycD.ji" => 155
"/home/kc/.julia/juliaup/julia-nightly/share/julia/compiled/v1.12/TOML/mjrwE_xxrt3.ji" => 155
"/home/kc/.julia/compiled/v1.12/Preferences/pWSk8_4Qv86.ji" => 152
"/home/kc/.julia/compiled/v1.12/Preferences/pWSk8_juhqb.ji" => 152
"/home/kc/.julia/juliaup/julia-nightly/share/julia/compiled/v1.12/StyledStrings/UcVoM_zHycD.ji" => 144
"/home/kc/.julia/juliaup/julia-nightly/share/julia/compiled/v1.12/StyledStrings/UcVoM_xxrt3.ji" => 144
```
After:
```julia
julia> @time Pkg.precompile()
0.460077 seconds (877.59 k allocations: 108.075 MiB, 4.77% gc time)
julia> isfile_calls[1:10]
10-element Vector{Pair{String, Int64}}:
"/tmp/jl_a5xFWK/Project.toml" => 15
"/tmp/jl_a5xFWK/Manifest.toml" => 7
"/home/kc/.julia/registries/General.toml" => 6
"/home/kc/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/Markdown/src/Markdown.jl"
=> 3
"/home/kc/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/Serialization/src/Serialization.jl"
=> 3
"/home/kc/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/Distributed/src/Distributed.jl"
=> 3
"/home/kc/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/UUIDs/src/UUIDs.jl"
=> 3
"/home/kc/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.12/LibCURL/src/LibCURL.jl"
=> 3
```
Performance is improved and we are not calling `isfile` on a bunch of the same ji files hundreds times.
Benchmark is made on a linux machine so performance diff should be a lot better on Windows where these `isfile_casesensitive` call is much more expensive.
Fixes #56366
---------
Co-authored-by: KristofferC <[email protected]>
Co-authored-by: Ian Butterworth <[email protected]>
(cherry picked from commit 9850a38)find_all_in_cache_path call during parallel precompilation (#56369)1 parent b3c3460 commit bea9c9c
2 files changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1770 | 1770 | | |
1771 | 1771 | | |
1772 | 1772 | | |
1773 | | - | |
| 1773 | + | |
| 1774 | + | |
1774 | 1775 | | |
1775 | 1776 | | |
1776 | 1777 | | |
| |||
1785 | 1786 | | |
1786 | 1787 | | |
1787 | 1788 | | |
1788 | | - | |
| 1789 | + | |
1789 | 1790 | | |
1790 | 1791 | | |
1791 | 1792 | | |
| |||
1827 | 1828 | | |
1828 | 1829 | | |
1829 | 1830 | | |
1830 | | - | |
| 1831 | + | |
| 1832 | + | |
1831 | 1833 | | |
1832 | 1834 | | |
1833 | | - | |
| 1835 | + | |
1834 | 1836 | | |
1835 | 1837 | | |
1836 | 1838 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
| 403 | + | |
| 404 | + | |
403 | 405 | | |
404 | 406 | | |
405 | 407 | | |
| |||
773 | 775 | | |
774 | 776 | | |
775 | 777 | | |
776 | | - | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
| |||
796 | 798 | | |
797 | 799 | | |
798 | 800 | | |
799 | | - | |
| 801 | + | |
800 | 802 | | |
801 | 803 | | |
802 | 804 | | |
| |||
0 commit comments