test: fail if the suite takes over 40s - #1263
Merged
Merged
Conversation
u9g
force-pushed
the
test-speed-regression
branch
from
August 30, 2026 12:30
a4c444b to
34927c1
Compare
The suite used to take ~3min, almost all of it in protodef-validator < 1.5.0 (quadratic dataType validation, PrismarineJS#1259 removed the other hotspot, Ajv's uniqueItems). Require 1.5.0 and assert total suite wall-clock stays under 40s (~20s locally) so a regression shows up in CI.
u9g
force-pushed
the
test-speed-regression
branch
from
August 30, 2026 12:31
34927c1 to
bb74d07
Compare
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.
Problem
The suite used to take ~3min. Almost all of that was protodef-validator < 1.5.0 validating
dataTypein time quadratic in the number of registered types (ProtoDef-io/node-protodef-validator#18), plus Ajv's O(n²)uniqueItems(removed in #1259). It now runs in ~20s, but nothing guards against that coming back.Change
protodef-validator@^1.5.0.afterhook asserts total suite wall-clock (performance.now(), measured from process start) stays under 40s — ~2x the current ~20s, while the old behaviour overshoots it by ~4x.Verification