Lukas W.
Well-known member
- Affected version
- 2.2
This is happening on an installation with all add-ons disabled and the default theme with no further modifications activated.
The page does not appear to preload node content permissions, and subsequently triggers multiple database queries to individually fetch the node permission cache each time a node permission check is performed.
The following query is performed around 6500 times on my dataset:
I've used a simple workaround hotfix for now of preloading the node permission cache and the total query count for the page dropped to 10:
There's probably a different/connected issue here, so this probably not an actual solution to the issue.
The page does not appear to preload node content permissions, and subsequently triggers multiple database queries to individually fetch the node permission cache each time a node permission check is performed.
The following query is performed around 6500 times on my dataset:
Code:
SELECT cache_value
FROM xf_permission_cache_content
WHERE permission_combination_id = ?
AND content_type = ?
AND content_id = ?
[B]Params:[/B] <permission_combiniation_id>, node, <node_id>
I've used a simple workaround hotfix for now of preloading the node permission cache and the total query count for the page dropped to 10:
Code:
class Member extends XFCP_Member
{
public function actionRecentContent(ParameterBag $params)
{
$user = \XF::visitor();
$user->PermissionSet->cacheAllContentPerms('node');
return parent::actionRecentContent($params);
}
}
There's probably a different/connected issue here, so this probably not an actual solution to the issue.