Skip to content

full-analysis: Parallelize signature analysis phase#351

Merged
aviatesk merged 1 commit intomasterfrom
avi/parallelize-sig-analysis
Dec 1, 2025
Merged

full-analysis: Parallelize signature analysis phase#351
aviatesk merged 1 commit intomasterfrom
avi/parallelize-sig-analysis

Conversation

@aviatesk
Copy link
Copy Markdown
Owner

@aviatesk aviatesk commented Dec 1, 2025

Parallelize signature analysis using Threads.@spawn, leveraging the thread-safe inference pipeline introduced in Julia v1.12. Each analysis task creates its own analyzer with fresh local caches to avoid data races.

Key changes:

  • Add SignatureAnalysisProgress struct with atomic fields for thread-safe progress tracking
  • Make LS_ANALYZER_CACHE thread-safe using CASContainer
  • Move AtomicContainers include earlier to make it available in Analyzer.jl

On a 4-core machine (--threads=4,2):

  • CSV.jl first-time analysis: 30s -> 18s (~1.7x faster)
  • JETLS.jl first-time analysis: 154s -> 36s (~4.3x faster)

Performance experiments

The measurement results below are for --threads=auto (--threads=4,2).

JETLS.jl

master 1dac93f vs. avi/parallelize-sig-analysis

JETLS Branch First time analysis (generation=0) Re-analysis (generation=1) Re-analysis (generation=2)
master 153.58 18.64 20.43
avi/parallelize-sig-analysis 35.89 14.2 14.66

CSV.jl

04ec1cf

JETLS Branch First time analysis (generation=0) Re-analysis (generation=1) Re-analysis (generation=2)
master 29.71 12.31 7.0
avi/parallelize-sig-analysis 18.45 5.68 4.1

Parallelize signature analysis using `Threads.@spawn`, leveraging the
thread-safe inference pipeline introduced in Julia v1.12. Each analysis
task creates its own analyzer with fresh local caches to avoid data
races.

Key changes:
- Add `SignatureAnalysisProgress` struct with atomic fields for
  thread-safe progress tracking
- Make `LS_ANALYZER_CACHE` thread-safe using `CASContainer`
- Move `AtomicContainers` include earlier to make it available in
  `Analyzer.jl`

On a 4-core machine (`--threads=4,2`):
- CSV.jl first-time analysis: 30s -> 18s (~1.7x faster)
- JETLS.jl first-time analysis: 154s -> 36s (~4.3x faster)
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.65%. Comparing base (1dac93f) to head (18b86dc).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/analysis/Interpreter.jl 72.41% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #351      +/-   ##
==========================================
+ Coverage   65.55%   65.65%   +0.09%     
==========================================
  Files          41       41              
  Lines        4207     4219      +12     
==========================================
+ Hits         2758     2770      +12     
  Misses       1449     1449              
Flag Coverage Δ
JETLS.jl 65.65% <75.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aviatesk aviatesk merged commit 4d217ab into master Dec 1, 2025
9 of 11 checks passed
@aviatesk aviatesk deleted the avi/parallelize-sig-analysis branch December 1, 2025 12:48
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.

1 participant