Skip to content

Tests run slow on Conda / macOS #40825

@orlitzky

Description

@orlitzky

Using https://github.com/sagemath/sage/pull/40819/files as an example, there are several doctests that raise "slow doctest" warnings only on macOS. Here is an example, run on my slowest CPU from a fresh start of sage (nothing cached):

sage: var('x,y,z')
(x, y, z)
sage: eqs = [-y^2+z^2, -x^2+y^2-3*z^2-z-1, -y*z-z^2-x-y+2, -x^2-12*z^2-y+z]
sage: %timeit -c -n1 -r1 solve_mod(eqs, 11)
1.3 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)

But the CI is showing,

slow doctest:: Test ran for 15.24s cpu, 25.71s wall
slow doctest:: Test ran for 21.44s cpu, 38.39s wall

Something similar happens in src/sage/geometry/polyhedron/palp_database.py, so it isn't only symbolics, or modular arithmetic that are the problem.

We're already measuring CPU seconds, and I don't think there are any processors slower than mine that run macOS, so I'm wondering if maybe some libraries were compiled without optimization on these CI runners?

I will note that psutil is loaded on-the-fly on macOS to measure CPU time, but the penalty for that should only hurt the first doctest in a series (and the problem isn't with the first doctest).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions