mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
![]() ## Summary This PR brings an optimization. - `get_cached_db` no longer returns a `MutexGuard`; instead, it returns a cloned database. ### `get_cached_db` Previously, the `MutexGuard` was held inside the property test function (defined in the macro), which prevented multiple property tests from running in parallel. More specifically, the program could only test one random test case at a time, which likely caused a significant bottleneck. On my local machine, running: ``` QUICKCHECK_TESTS=100000 cargo test --release -p red_knot_python_semantic -- --ignored stable ``` showed about **a 75% speedup** (from \~60s to \~15s). |
||
---|---|---|
.. | ||
resources | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml | ||
mdtest.py | ||
mdtest.py.lock |