tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit c646ce9552ff23627731c3d904c512f5296ce4c2
parent 103787e777fc70ef86037e6b57e2070f01adb6c0
Author: serge-sans-paille <sguelton@mozilla.com>
Date:   Mon,  8 Dec 2025 15:00:12 +0000

Bug 2002884 - Cache calls to manifestparser.manifestparser.filters._match r=jcristau

This saves a large 1.7s during task graph computation.

Differential Revision: https://phabricator.services.mozilla.com/D274359

Diffstat:
Mtesting/mozbase/manifestparser/manifestparser/filters.py | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/testing/mozbase/manifestparser/manifestparser/filters.py b/testing/mozbase/manifestparser/manifestparser/filters.py @@ -8,6 +8,7 @@ dictionary of values, and returns a new iterable of test objects. It is possible to define custom filters if the built-in ones are not enough. """ +import functools import itertools import os from collections import defaultdict @@ -20,6 +21,7 @@ from .util import normsep # built-in filters +@functools.lru_cache(maxsize=None) def _match(exprs, strict, **values): """Return the first matching expression, or None if no match.""" for e in exprs.splitlines():