Skip to content

perf: avoid spawning a new thread per worker output message#14185

Open
Kha wants to merge 1 commit into
masterfrom
push-rltlrxxmztnl
Open

perf: avoid spawning a new thread per worker output message#14185
Kha wants to merge 1 commit into
masterfrom
push-rltlrxxmztnl

Conversation

@Kha

@Kha Kha commented Jun 25, 2026

Copy link
Copy Markdown
Member

Also reduces number of samply tracks for re-elab tests from ~3000 to ~40

@Kha Kha requested a review from mhuisi as a code owner June 25, 2026 20:59
@Kha

Kha commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

!bench

@leanprover-radar

leanprover-radar commented Jun 25, 2026

Copy link
Copy Markdown

Benchmark results for 776f9fb against 08c8b6a are in. No significant results found. @Kha

  • 🟥 build//instructions: +207.6M (+0.00%)

Medium changes (1🟥)

  • 🟥 misc/re-elab Init.Data.BitVec.Lemmas//instructions: +79.9G (+9.85%)

Small changes (5✅, 2🟥)

  • build/profile/grind dsimp//wall-clock: -7ms (-58.32%)
  • elab/bv_decide_realworld//wall-clock: -53ms (-4.47%)
  • misc/re-elab Init.Data.BitVec.Lemmas//task-clock: -5s (-5.26%)
  • misc/re-elab Init.Data.List.Basic//task-clock: -1s (-7.53%)
  • 🟥 misc/re-elab Init.Data.List.Sublist//instructions: +8.1G (+5.79%)
  • misc/re-elab Init.Data.List.Sublist//task-clock: -1s (-5.80%)
  • 🟥 misc/re-elab watchdog Init.Data.List.Sublist//instructions: +9.7G (+2.04%)

@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jun 25, 2026
@mathlib-lean-pr-testing

Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 08c8b6a4546e37a66c1b90cf12f7572216faf38d --onto 0758b1d2e33c65ccea578abb0c668aab1f811608. You can force Mathlib CI using the force-mathlib-ci label. (2026-06-25 21:36:28)

@leanprover-bot

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 08c8b6a4546e37a66c1b90cf12f7572216faf38d --onto 2e72131c7f007ab9d2538b676106c5141b24ba22. You can force reference manual CI using the force-manual-ci label. (2026-06-25 21:36:29)

@Kha

Kha commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

Instructions increases might be from additional parallelism? Certainly look harmless when all -clocks are pointing in the right direction

let params : PublishDiagnosticsParams ← fromJson? (toJson params) |>.toOption
params.version?
| some (.notification "$/lean/fileProgress" (some params)) =>
let params : LeanFileProgressParams ← fromJson? (toJson params) |>.toOption

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.

Tangentially, it would probably make sense to avoid the JSON roundtrip in at least this case at it happens so often

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants