Skip to content

Improve precompilation - #359

Merged
fingolfin merged 5 commits into
masterfrom
precompile
Feb 25, 2026
Merged

fingolfin merged 5 commits into
masterfrom
precompile

Conversation

@JamesWrigley

Copy link
Copy Markdown
Member

In an effort to bring down the TTFX/runtime. On ZMQ.jl this brings the time for Aqua.test_all(ZMQ) down from ~8.7s to ~6.1s, so about 30%. The downside is that the precompilation time increased from ~1.4s to ~11s, which is quite a hit. My feeling is that it's still worth it though since Aqua has relatively few dependencies and is unlikely to get invalidated frequently. I'd recommend reviewing each commit separately.

@JamesWrigley

Copy link
Copy Markdown
Member Author

I fixed some of the formatting issues, but I felt the other suggestions make the code less readable 🤷

@codecov

codecov Bot commented Dec 12, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.07%. Comparing base (62eda50) to head (d81d7ba).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/precompile.jl 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #359      +/-   ##
==========================================
+ Coverage   86.77%   87.07%   +0.30%     
==========================================
  Files          11       12       +1     
  Lines         514      534      +20     
==========================================
+ Hits          446      465      +19     
- Misses         68       69       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/precompile.jl Resolved
In particular to `find_stale_deps()`, which took about 600ms to compile.
Comment thread src/precompile.jl Resolved
fingolfin and others added 3 commits February 25, 2026 11:21
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment thread src/persistent_tasks.jl
Comment on lines +87 to +88
pkgname = get(TOML.parsefile(project), "name", "")::String
if isempty(pkgname)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's to make it type-stable. I could also have changed the type annotation to Union{String, Nothing}, but I felt that sticking with only strings is simpler.

@fingolfin
fingolfin merged commit 951c986 into master Feb 25, 2026
18 checks passed
@fingolfin
fingolfin deleted the precompile branch February 25, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants