Skip to content

very slow test execution when there are many (~thousands) of tests defined in a file #4325

@devoncarew

Description

@devoncarew

I'm working on a project where most of the tests are generated from a specification. There are tens of thousands of tests, and depending on the granularity of the source spec (the WASM specification) there can be several thousands tests in a single dart source file.

I see very slow test execution (from VS Code) when there are thousands of tests in a single dart source file. This is in comparison to running dart test for the same project from the command line - test execution there is on the order of a few seconds (6.90s for 7,590 tests). From VS code, just the tests in one file may take a few minutes to run.

I assume there's a quadratic / polynomial algorithm in there somewhere. I'm not sure if its in dart test (finding the locations for tess in the files?), in VS Code (displaying the locations?) or in the communication between the two (discovering tests and communicating it back to VS Code?). Or perhaps in the xml reporter for dart test - generally only used by IDEs?

In any case, I'm opening this issue to track the performance problem. The repo for the project demonstrating the issue is https://github.com/devoncarew/wasmd. The tests w/ perf issues are test/spec/f32/f32_test.dart and test/spec/f64/f64_test.dart. Let me know if there's any more digging you'd like me to do on my end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    in dartRelates to running Dart programsin testingRelates to test execution of Dart/Flutter tests for end usersis performance

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions