Repository navigation
Build the fixture database in one transaction - #2971
Open
quotentiroler wants to merge 1 commit into
Open
quotentiroler wants to merge 1 commit into
quotentiroler wants to merge 1 commit into
Conversation
quotentiroler
force-pushed
the
fixture-transaction
branch
from
November 6, 2026 20:05
c902f12 to
6aba20b
Compare
Author
|
@simonw CI on this PR never ran: every fork PR opened Sep 30 to Oct 1 failed instantly with zero jobs ("workflow file issue"), the same for #2973 and several others. I've rebased onto current main to trigger it again. The speedup holds on Linux too. In |
This branch has not been deployed
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.
Refs #2970
executescript()does not open a transaction, so the ~1,440 INSERTs inTABLESeach committed separately.Wrapping the script in
BEGIN;/COMMIT;takespopulate_fixture_database()from 11,453 ms to 19 ms here (single process, best of three, Windows 11 / Python 3.14), producing an identical database: a sha256 over every table's full contents matches.This runs on every
make_app_client(), so it is the bulk of the suite's setup cost.pytest tests/test_html.py tests/test_queries.py tests/test_stored_queries.pywent from 470.6s to 28.7s with the same pass/fail counts.