Static caching for toolkit definition

Created on 3 December 2021, over 3 years ago
Updated 9 March 2023, about 2 years ago

Problem/Motivation

Working on a media migration that was taking hours to finish. Profiling with xhprof showed that 85% of that time was MutableQualityToolkitManager::getActiveToolkit() reading (the same) YAML files. This probably doesn't matter in day-to-day usage, but if you're creating a lot of media entities in a batch, it might.

Proposed resolution

There are likely "better" ways to solve this by refactoring, but the easiest solution is to statically cache the active toolkit definition, so it only needs to be loaded once per request.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jeffm2001

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024