in #2161591: Change default active config from file storage to DB storage we're discussing replacing the active store with a queryable key value based store. Whilst reviewing the relevant code I realised we could swap out calls to Drupal::config()->get() with a call to ConfigFactory::readMultiple().

This should help us leverages the static cache in ConfigFactory better.

Files: 
CommentFileSizeAuthor
#4 2163371_4.patch4.47 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 60,048 pass(es). View
#3 2163371.3.patch4.47 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 60,187 pass(es). View
#3 1-3-interdiff.txt703 bytesalexpott
#1 2163371.1.patch4.62 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 60,126 pass(es). View

Comments

alexpott’s picture

Status: Active » Needs review
Related issues: +#2161591: Change default active config from file storage to DB storage
FileSize
4.62 KB
PASSED: [[SimpleTest]]: [MySQL] 60,126 pass(es). View

Here's a patch.

alexpott’s picture

Issue summary: View changes
alexpott’s picture

Issue summary: View changes
FileSize
703 bytes
4.47 KB
PASSED: [[SimpleTest]]: [MySQL] 60,187 pass(es). View

Ok. reading the code realised that the patch in #1 would break count queries on empty result sets.

alexpott’s picture

FileSize
4.47 KB
PASSED: [[SimpleTest]]: [MySQL] 60,048 pass(es). View

A dot free patch

beejeebus’s picture

looks good to me. alexpott++

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

To me as well.

It's not as much about the static cache but the persistent cache in the cached storage controller, a getMultiple() is a single getMultiple() on the cache backend, which is more efficient.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice catch!

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.