Bug 1646514: Use a single manifest loader for all tests; r=Callek

Since `@memoize` on a method is per-instance, use a single instance for all
tests, rather than a new one for each tasks. This gives a ~4x speedup in test
task generation.

Differential Revision: https://phabricator.services.mozilla.com/D79764
This commit is contained in:
Tom Prince 2020-06-17 21:21:35 +00:00
Родитель 6387c1ed23
Коммит 91916ebd33
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -1406,6 +1406,9 @@ def set_test_verify_chunks(config, tasks):
def set_test_manifests(config, tasks):
"""Determine the set of test manifests that should run in this task."""
loader_cls = manifest_loaders[config.params['test_manifest_loader']]
loader = loader_cls(config.params)
for task in tasks:
if task['suite'] in CHUNK_SUITES_BLACKLIST:
yield task
@ -1429,8 +1432,6 @@ def set_test_manifests(config, tasks):
mozinfo = guess_mozinfo_from_task(task)
loader_cls = manifest_loaders[config.params['test_manifest_loader']]
loader = loader_cls(config.params)
task['test-manifests'] = loader.get_manifests(
task['suite'],
frozenset(mozinfo.items()),