• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Backward Compatability Breaks!

All you can do is select more than you need and hope that when you filter them, you have n remaining. Any more than that, you can chop off.

(This is the principle behind pretty much every search engine that has to manage diverse data)
i'm not sure if i misunderstood you, or if your way is also not optimal:p

the current code (with your suggestion) is=> https://github.com/ragtek/xf-addons/blob/master/Latest.php
method getLatestPostsNew

this method is very time consuming on big boards

the limit, which i had in the past, helps here really
PHP:
$nodeModel = XenForo_Model::create('XenForo_Model_Node');
$viewableNodeList = $nodeModel->getViewableNodeList(); // check if this returns pages too, if yes, we need an other way
 
 $nodes = array_keys($viewableNodeList);
 $where = implode(',', $nodes);
 
i'm not sure if i misunderstood you, or if your way is also not optimal:p

the current code (with your suggestion) is=> https://github.com/ragtek/xf-addons/blob/master/Latest.php
method getLatestPostsNew

this method is very time consuming on big boards

the limit, which i had in the past, helps here really
PHP:
$nodeModel = XenForo_Model::create('XenForo_Model_Node');
$viewableNodeList = $nodeModel->getViewableNodeList(); // check if this returns pages too, if yes, we need an other way

$nodes = array_keys($viewableNodeList);
$where = implode(',', $nodes);
If this is referring what I think it is, it's not that function that's being called. While a larger limit will slow down getLatestPostsNew a small amount, the index is what will make it be fast.

The slow function is getLatestThreads ordered by thread.post_date because there's no index. This forces selecting all rows, sorting, and limiting.
 
The slow function is getLatestThreads ordered by thread.post_date because there's no index. This forces selecting all rows, sorting, and limiting.
thx..
hadn't checked the indexes, i thought that both dates have one...
 
Since we are on 1.1, does this thread dealing with:
Backward Compatability Breaks Since 1.0.0 RC3
still have relevance ? enough for a sticky ?
 
Top Bottom