diff options
-rw-r--r-- | CHANGES.rst | 7 | ||||
-rw-r--r-- | CONTRIBUTORS.txt | 1 | ||||
-rw-r--r-- | coverage/collector.py | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 19d4135f..b7a7a235 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -20,7 +20,12 @@ development at the same time, such as 4.5.x and 5.0. Unreleased ---------- -Nothing yet. +- Performance: an internal cache of file names was accidentally disabled, + resulting in sometimes drastic reductions in performance. This is now fixed, + closing `issue 1527`_. Thanks to Ivan Ciuvalschii for the reproducible test + case. + +.. _issue 1527: https://github.com/nedbat/coveragepy/issues/1527 .. _changes_7-0-3: diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index af6c4c26..012963d1 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -81,6 +81,7 @@ Hugo van Kemenade Ilia Meerovich Imri Goldberg Ionel Cristian Mărieș +Ivan Ciuvalschii J. M. F. Tsang JT Olds Jerin Peter George diff --git a/coverage/collector.py b/coverage/collector.py index a3c537d6..ab743ee3 100644 --- a/coverage/collector.py +++ b/coverage/collector.py @@ -433,7 +433,7 @@ class Collector: plugin._coverage_enabled = False disposition.trace = False - @functools.lru_cache(maxsize=0) + @functools.lru_cache(maxsize=None) # pylint: disable=method-cache-max-size-none def cached_mapped_file(self, filename: str) -> str: """A locally cached version of file names mapped through file_mapper.""" return self.file_mapper(filename) |