Skip to content

PERF: Profiling test collection? #7338

@jbrockmendel

Description

@jbrockmendel

The pandas tests suite clocks in at 90292 tests, which for me takes 67 seconds to run pytest pandas/tests --collect-only. This becomes troublesome when I want to re-run just a few failed tests with --lf, and doesn't appear amenable to parallelization.

When profiling with cProfile, it looks like just over half the time is spent in cacheprovider.pytest_collection_modifyitems

Are there suggested patterns for profiling and/or optimizing the test collection?

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: collectionrelated to the collection phasetype: performanceperformance or memory problem/improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions