Skip to content

Speed up test diff and timing calculations - #4239

Merged
josephsnyder merged 1 commit into
Kitware:masterfrom
williamjallen:test-diff-performance
Nov 18, 2026
Merged

josephsnyder merged 1 commit into
Kitware:masterfrom
williamjallen:test-diff-performance

Conversation

@williamjallen

Copy link
Copy Markdown
Member

When CDash processes test results, it compares each test with the same test in the previous build. That comparison is used to count new passes and failures and to update test timing statistics. Both steps searched the previous build's whole test list for every test, so processing slowed down sharply as the number of tests grew.

This change builds a lookup by test name once and uses it instead. In benchmarks of the comparison loops, a build with 5,000 tests went from 26 s to 13 ms.

When CDash processes test results, it compares each test with the same test in the previous build. That comparison is used to count new passes and failures and to update test timing statistics. Both steps searched the previous build's whole test list for every test, so processing slowed down sharply as the number of tests grew.

This change builds a lookup by test name once and uses it instead. In benchmarks of the comparison loops, a build with 5,000 tests went from 26 s to 13 ms.
@josephsnyder
josephsnyder added this pull request to the merge queue Nov 18, 2026
Merged via the queue into Kitware:master with commit bb852e9 Nov 18, 2026
8 checks passed
@williamjallen
williamjallen deleted the test-diff-performance branch November 18, 2026 21:16
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