You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eb9af35
Browse filesBrowse the repository at this point in the historyBrowse files
perf(compile): close the fresh compile gap with ordered native scheduling and mimalloc (#889)
* perf(analysis): schedule native query analysis largest first
Hand out each native analysis batch through a shared queue ordered by SQL size, so the widest queries start first instead of becoming a late critical path. Results keep request order. Fresh 3000 native analysis wall falls from about 2.24 s to 1.91 s with identical output.
* perf(native): use mimalloc as the native extension allocator
Native analysis spends about 40% of its time in the system allocator building and dropping syntax trees. mimalloc (local-dynamic TLS for the dlopen-loaded extension) cuts fresh 3000 native analysis from about 6.4 to 4.8 CPU-s and 1.9 to 1.4 s wall with identical output. Fresh 3000 peak memory falls from about 830 to 690 MB; dense 3000 CPU falls about 7% at similar peak memory.
* perf(tests): reuse parsed model SQL when rendering SQL-test comparisons
Tests in one project render the same model SQL many times while lifting its CTEs into the comparison query; fresh 3000 splits about 1,150 statements from only 50 distinct SQL strings. Keep a parse of SQL once it repeats within a render batch, bounded to 1 MiB of SQL text, and clone it for each later use; per-test CTE renaming is unchanged. Unrepeated SQL is never retained, so dense projects keep their peak memory. Fresh 3000 native planning and rendering falls from about 455 to 380 ms with identical artifacts.
* ci: restore the fresh same-runner compile ratio limit to 1.10
Fresh 3000 --no-cache is back within 1.10x of 0.119.1 on the same machine (medians of 3 interleaved runs: 8.22 s vs 7.86 s wall, 12.56 vs 12.54 CPU-s), so the temporary 1.30 limit is no longer needed.
* ci: build every wheel platform on pull requests that change native inputs
Build the same Linux, macOS and Windows wheel matrix as publish.yml, without uploading, whenever crates, Cargo manifests, pyproject.toml or the verify workflow change, and smoke-import sqlbuild._native from each built wheel. The aggregate Verify job treats the job like the other path-selected suites.
* test: allow the 10,000-model cache-write CPU overhead the same 1.15 as wall
0 commit comments