Problem/Motivation
Configuration Import is slow and needs a lot of memory.
A lot of that is the schema validation in Config::save. We also recalculate the dependencies for all configuration entities.
Proposed resolution
Add a trusted flag to Config::save() / ConfigEntityBase::save() so that casting to schema and calculating dependencies can be skipped for module and theme installation.
This does not affect schema coverage during testing because we still have the config save event listener that checks all configuration - and if any module ships with invalid config this will find it :)
Furthermore, once we implement import validators for dependencies and schema we can skip them during import making that quicker too. See
- #2414951: Validate configuration schema before importing configuration
- #2416109: Validate configuration dependencies before importing configuration