Repository navigation
Compile the engine binaries at build time, not at the first index - #1831
Merged
swapnilpaliwal-sd merged 1 commit intoSep 30, 2026
Conversation
On a cold cache the first index compiled the language's engine with the C++ compiler: minutes regardless of repository size, while the index itself takes seconds. run-souffle.sh gains --prepare (the same program, id, cache entry and lock as a run, without a project), bin/axiomcode gains `prepare` (every language in parallel), and npm's postbuild starts it in the background, so an install or a refresh compiles the engines before the first index needs them. Skipped under CI or AXIOMCODE_NO_PREPARE. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 30, 2026 15:18
swapnilpaliwal-sd
deleted the
apps/javascript/cold-datalog-compile-dominates-first-ind
branch
September 30, 2026 16:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On a cold cache, the first index compiled the language's engine with the C++ compiler. That took minutes whatever the repository's size; the index itself takes seconds.
run-souffle.sh --prepare: makes one language's engine binary ready (packaged, cached or compiled) without a project. It uses the same program text, engine id, cache entry and compile lock as a run, so an index that starts while a compile runs waits for it and does not compile a second time.bin/axiomcode prepare [--language …] [--background]: prepares every language in parallel.postbuildstarts it in the background, so an install or refresh compiles the engines before the first index. CI orAXIOMCODE_NO_PREPAREskips it.engine-package-test.shgets cases for prepare, then a second prepare with no recompile, then a run that reuses the prepared binary. The control: a background prepare under CI compiles nothing. The new cases fail on the old script (6 failures).Checked on a 3-file JS repo with a cold cache: first index went from 315 s to 3 s after prepare (5 engines prepared in parallel in 422 s at build time). JS suite 88/88. Engine-id, engine-package, souffle-include and bundle tool tests ok. On the product, edges are 11309 → 11309 and probes 57/70 → 57/70.