Skip to content

sysmon is slower than ctrace on 3.14 for the Scrapy test suite #2172

Description

@wRAR

I hate to file yet another performance/cores/Python versions report but I haven't seen anything related, only the opposite ones. Out of the box Scrapy tests are much slower on 3.14 than on 3.13, and the 3.14 speed can be improved by setting COVERAGE_CORE=ctrace.

Some numbers:

  • On current master the GitHub CI runs for the Ubuntu py env for 3.13 and 3.14 report respectively 244.02s (0:04:04) and 460.74s (0:07:40), this is with 4 xdist workers.
  • Locally without xdist I get 291.91s (0:04:51) for 3.13, 394.46s (0:06:34) for 3.14 and 296.78s (0:04:56) for 3.14 with COVERAGE_CORE=ctrace.
  • Locally with xdist (16 workers) I get 46.57s for 3.13, 79.93s (0:01:19) for 3.14 and 47.94s for 3.14 with COVERAGE_CORE=ctrace.

The way to reproduce this is to clone https://github.com/scrapy/scrapy and run tox -e py with various settings and Python versions (note that COVERAGE_* aren't in passenv though).

The currently used versions are Python 3.13.12/3.13.13 and 3.14.5, coverage 7.14.0, pytest-cov 7.1.0, pytest 9.0.3. COVERAGE_DEBUG=core doesn't print anything. The config:

[tool.coverage.run]
branch = true
include = ["scrapy/*"]
omit = ["tests/*"]
disable_warnings = ["include-ignored"]
patch = [
    "subprocess",
]

[tool.coverage.paths]
source = [
    "scrapy",
    ".tox/**/site-packages/scrapy"
]

[tool.coverage.report]
exclude_also = [
    "@(abc\\.)?abstractmethod",
    '\A(?s:.*# pragma: no file cover.*)\Z',
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions