Skip to content

Improve test creation performance#3518

Merged
josephsnyder merged 4 commits intoKitware:masterfrom
williamjallen:test-creation-performance
Mar 9, 2026
Merged

Improve test creation performance#3518
josephsnyder merged 4 commits intoKitware:masterfrom
williamjallen:test-creation-performance

Conversation

@williamjallen
Copy link
Collaborator

Test insertion is the most performance-critical part of CDash, simply because there are often 2-4 orders of magnitude more tests than builds. Each of those tests then has an additional order of magnitude more measurements and/or labels associated with it. This PR improves two things:

  1. Only the test output ID is queried instead of the entire model. This reduces the amount of network I/O to the database.
  2. The entire test creation process is wrapped in a transaction. In addition to ensuring consistency, this also avoids the overhead of committing after many small transactions.

There's more to be done here, particularly relating to bulk inserts of labels, measurements, and images, but some substantial refactoring needs to be done first.

This avoids needing to commit many small transactions, while also giving us consistency for free.
Copy link
Member

@josephsnyder josephsnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@josephsnyder josephsnyder added this pull request to the merge queue Mar 9, 2026
Merged via the queue into Kitware:master with commit f3f1288 Mar 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants