Skip to content
Snippets Groups Projects
Commit 2319222e authored by Dezső Biczó's avatar Dezső Biczó Committed by Kristiaan Van den Eynde
Browse files

Issue #3296157 by mxr576: array_merge() in a loop is slow

parent ed0f8b1f
No related branches found
No related tags found
No related merge requests found
......@@ -201,8 +201,9 @@ class ChainPermissionCalculator implements ChainPermissionCalculatorInterface {
else {
$contexts = [];
foreach ($this->getCalculators() as $calculator) {
$contexts = array_merge($contexts, $calculator->getPersistentCacheContexts($scope));
$contexts[] = $calculator->getPersistentCacheContexts($scope);
}
$contexts = array_merge(...$contexts);
// Store the contexts in the regular static cache.
$this->regularStatic->set($cid, $contexts);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment