Skip to content

Add precompile statements to improve TTFW (Time-To-First-Worker) #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

JamesWrigley
Copy link
Collaborator

Before:

julia> @time addprocs(1)
  4.592567 seconds (6.56 M allocations: 328.356 MiB, 1.24% gc time, 89.93% compilation time)
1-element Vector{Int64}:
 2

julia> @time addprocs(1)
  3.466125 seconds (25.68 k allocations: 1.455 MiB, 1.12% compilation time)
1-element Vector{Int64}:
 3

After:

julia> @time addprocs(1)
  3.204588 seconds (3.09 M allocations: 154.957 MiB, 1.04% gc time, 71.17% compilation time)
1-element Vector{Int64}:
 2

julia> @time addprocs(1)
  1.932320 seconds (25.67 k allocations: 1.454 MiB, 2.07% compilation time)
1-element Vector{Int64}:
 3

Could probably be improved in the future. A tricky part is running SnoopCompile inside the worker to get inference results.

Before:
```julia-repl
julia> @time addprocs(1)
  4.592567 seconds (6.56 M allocations: 328.356 MiB, 1.24% gc time, 89.93% compilation time)
1-element Vector{Int64}:
 2

julia> @time addprocs(1)
  3.466125 seconds (25.68 k allocations: 1.455 MiB, 1.12% compilation time)
1-element Vector{Int64}:
 3
```

After:
```julia-repl
julia> @time addprocs(1)
  3.204588 seconds (3.09 M allocations: 154.957 MiB, 1.04% gc time, 71.17% compilation time)
1-element Vector{Int64}:
 2

julia> @time addprocs(1)
  1.932320 seconds (25.67 k allocations: 1.454 MiB, 2.07% compilation time)
1-element Vector{Int64}:
 3
```

Could probably be improved in the future. A tricky part is running SnoopCompile
inside the worker to get inference results.
@JamesWrigley JamesWrigley self-assigned this Nov 17, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.48%. Comparing base (b9a8000) to head (c3bbb70).
Report is 28 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master       #7      +/-   ##
==========================================
+ Coverage   86.37%   86.48%   +0.10%     
==========================================
  Files          10       10              
  Lines        1982     1983       +1     
==========================================
+ Hits         1712     1715       +3     
+ Misses        270      268       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JamesWrigley JamesWrigley merged commit e990442 into master Nov 17, 2024
11 checks passed
@JamesWrigley JamesWrigley deleted the ttfx branch November 17, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants