Skip to content

perf: build external highlights with one Lake invocation - #1099

Open
ejgallego wants to merge 1 commit into
leanprover:mainfrom
ejgallego:perf/external-highlight-build
Open

ejgallego wants to merge 1 commit into
leanprover:mainfrom
ejgallego:perf/external-highlight-build

Conversation

@ejgallego

@ejgallego ejgallego commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

We remove a redundant call to lake build subverso-extract-mod when loading external code examples. The call is not needed because the subsequent lake build +Module:highlighted already builds the extractor as a dependency. Running both commands starts Lake twice, even when the external project is up to date.

In local measurements on a small, warm project, this reduces median loader time from 993 ms to 486 ms.

The regression tests cover cold and warm loads, source changes, compilation failures, and recovery on the current toolchain and Lean 4.31. lake build and all 858 tests pass.

No-Changelog: reduce internal build overhead without changing the author-facing API.

@ejgallego
ejgallego force-pushed the perf/external-highlight-build branch from 04320a4 to 1960810 Compare November 11, 2026 01:43
@ejgallego ejgallego changed the title perf: avoid a redundant extractor build for external examples perf: build external highlights with one Lake invocation Nov 11, 2026
We remove a redundant call to `lake build subverso-extract-mod` when loading external code examples. The call is not needed because the subsequent `lake build +Module:highlighted` already builds the extractor as a dependency. Running both commands starts Lake twice, even when the external project is up to date.

In local measurements on a small, warm project, this reduces median loader time from 993 ms to 486 ms.

The regression tests cover cold and warm loads, source changes, compilation failures, and recovery on the current toolchain and Lean 4.31. `lake build` and all 858 tests pass.

No-Changelog: reduce internal build overhead without changing the author-facing API.
@ejgallego
ejgallego force-pushed the perf/external-highlight-build branch from 1960810 to 444ae4b Compare November 11, 2026 02:00
@ejgallego
ejgallego marked this pull request as ready for review November 11, 2026 02:07

This branch has not been deployed

No deployments
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