after five years since my last post on this subject, I have to bring it up one last time.
When we changed from XF1 to XF2 our loading times increased massively.
so we once invested in a new server - clearly totally oversized.
2 processors (40 cores) 3,2 Ghz
256 GB RAM ECC
8X 1TB SAS SSD RAID 6
nginx, PHP 7.3 - 7.4 comes the days,
The DB is super fast and not at all our problem. It is actually XF.
For example, the method loadNodeTypeDataForNodes is very very very slow and provides almost 300% more time - with hardly measurable more DB time.
More infos zum Testaufbau siehe Spoiler
StartPage without loadNodeTypeDataForNodes
vs
with loadNodeTypeDataForNodes
At the end of the day our start page is at just under 1 second loading time!
I think, I hope - that there is still room for improvement on the part of XF that this will get better.
For questions and further data/tests I am at your disposal
And while I'm at it, working with user groups is a massive task of patience at XF! I can't have to wait minutes and minutes for permissions to be rebuilt when I change a group! For me a clear design flaw! Sure, for a small forum like this support forum, everything runs super and fast. But what about a monetized professional environment?
Hence my appeal to the developers to make XF a professional software and not a toy.
When we changed from XF1 to XF2 our loading times increased massively.
so we once invested in a new server - clearly totally oversized.
2 processors (40 cores) 3,2 Ghz
256 GB RAM ECC
8X 1TB SAS SSD RAID 6
nginx, PHP 7.3 - 7.4 comes the days,
The DB is super fast and not at all our problem. It is actually XF.
For example, the method loadNodeTypeDataForNodes is very very very slow and provides almost 300% more time - with hardly measurable more DB time.
More infos zum Testaufbau siehe Spoiler
StartPage without loadNodeTypeDataForNodes
Code:
Page Time: 0.1482s
Memory: 18.8146 MB (Peak: 18.9180 MB)
Queries (6, time: 0.0037s, 2.5%)
vs
with loadNodeTypeDataForNodes
Code:
Page Time: 0.4283s
Memory: 55.7910 MB (Peak: 63.1037 MB)
Queries (9, time: 0.0090s, 2.1%)
At the end of the day our start page is at just under 1 second loading time!
Code:
Page Time: 0.8352s
NOW Attachments@au lait it would be interesting to see a profile graph of that using xdebug & webgrind or similar.
i also find the discussion at that time about too many nodes a little out of place! It shouldn't matter if 50 users or 50k users as well as 5 nodes or 5k. I find it crass to say that these are not normal quantities! Who defines normal? Why are 5K or 100k users normal and not just 50? But 5K nodes not but 50?owever, in general, we wouldn't consider 2000 nodes to really be a "normal"
I think, I hope - that there is still room for improvement on the part of XF that this will get better.
For questions and further data/tests I am at your disposal
And while I'm at it, working with user groups is a massive task of patience at XF! I can't have to wait minutes and minutes for permissions to be rebuilt when I change a group! For me a clear design flaw! Sure, for a small forum like this support forum, everything runs super and fast. But what about a monetized professional environment?
Hence my appeal to the developers to make XF a professional software and not a toy.
For this test I had to make some changes to avoid 10K queries
As well as emptying the template "forum_list
Code:
public function getNodeList(\XF\Entity\Node $withinNode = null)
{
if ($withinNode && !$withinNode->hasChildren())
{
return $this->em->getEmptyCollection();
}
$nodes = $this->findNodesForList($withinNode)->fetch();
//$this->loadNodeTypeDataForNodes($nodes);
return $nodes;
}
Code:
public function actionList(ParameterBag $params)
{
$nodeRepo = $this->getNodeRepo();
$nodes = $nodeRepo->getNodeList();
$nodeTree = [];
$nodeExtras = [];
//$nodeTree = $nodeRepo->createNodeTree($nodes);
//$nodeExtras = $nodeRepo->getNodeListExtras($nodeTree);
$viewParams = [
'nodeTree' => $nodeTree,
'nodeExtras' => $nodeExtras
];
return $this->view('XF:Forum\Listing', 'forum_list', $viewParams);
}
As well as emptying the template "forum_list