👓 What did you see?
My tests consist of 1584 scenarios and 18147 steps. On 11.0.0 this takes roughly 3 mins. Since the bump, it takes at least 4.5mins.
AI did a bit of digging and profiling, and it pinned it down to the following change in the MessageBuilder. I've included it, it might be a helpful pointer but obvious you folks know best what the reason for that change was.
Cucumber 11.1.x rewrote Formatter::MessageBuilder#on_test_step_started / #on_test_step_finished. What was an O(1) hash lookup:
test_case = @test_case_by_step_id[event.test_step.id]
became a full scan of every test case accumulated so far, checking every step of each:
@repository.test_case_by_id.values
.detect { |tc| tc.test_steps.any? { |s| s.id == event.test_step.id } }
That runs twice per step, and the repository grows as the run progresses, so the cost is quadratic in suite size.
✅ What did you expect to see?
Upgrading should not impact the test run in such a big way.
📦 Which tool/library version are you using?
No response
🔬 How could we reproduce it?
No response
📚 Any additional context?
No response
👓 What did you see?
My tests consist of 1584 scenarios and 18147 steps. On 11.0.0 this takes roughly 3 mins. Since the bump, it takes at least 4.5mins.
AI did a bit of digging and profiling, and it pinned it down to the following change in the MessageBuilder. I've included it, it might be a helpful pointer but obvious you folks know best what the reason for that change was.
Cucumber 11.1.x rewrote Formatter::MessageBuilder#on_test_step_started / #on_test_step_finished. What was an O(1) hash lookup:
became a full scan of every test case accumulated so far, checking every step of each:
That runs twice per step, and the repository grows as the run progresses, so the cost is quadratic in suite size.
✅ What did you expect to see?
Upgrading should not impact the test run in such a big way.
📦 Which tool/library version are you using?
No response
🔬 How could we reproduce it?
No response
📚 Any additional context?
No response