There's a forum on my board where every thread has prefixes, and it takes a lot of time to enter to that forum.
Does the number of prefixes on a page affect performance?
If the numbers don't are like 10 000 prefixes or something the performance isn't really going to be affected.
10.000 on the whole board?
I think, there's more than 30000 on my site.
Woow, that's a lot.
As the prefixes are loaded in a JOIN query in the forumdisplay page, the more prefixes there are, the slower it will get.
Can i disable all the prefixes temporary?
Just to see the server load without them.
You can do a temporary core edit. In forumdisplay.php search for:
$query = $db->query("
SELECT t.*, p.displaystyle AS threadprefix, {$ratingadd}{$select_rating_user}t.username AS threadusername, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid){$select_voting}
LEFT JOIN ".TABLE_PREFIX."threadprefixes p ON (p.pid = t.prefix)
WHERE t.fid='$fid' $tuseronly $tvisibleonly $datecutsql2
GROUP BY t.tid
ORDER BY t.sticky DESC, {$t}{$sortfield} $sortordernow $sortfield2
LIMIT $start, $perpage
");
And replace with:
$query = $db->query("
SELECT t.*, {$ratingadd}{$select_rating_user}t.username AS threadusername, u.username
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid){$select_voting}
WHERE t.fid='$fid' $tuseronly $tvisibleonly $datecutsql2
GROUP BY t.tid
ORDER BY t.sticky DESC, {$t}{$sortfield} $sortordernow $sortfield2
LIMIT $start, $perpage
");
This will only disable the prefixes in the forum display page.
Change it back to the original once you tested it.
No problem. Let us know how it turns out.
(2011-06-02, 07:29 AM)Aries-Belgium Wrote: [ -> ]If the numbers don't are like 10 000 prefixes or something the performance isn't really going to be affected.
Did you mean 10000 defined prefixes or 10000 threads having a prefix?
(2011-06-02, 03:12 PM)linguist Wrote: [ -> ] (2011-06-02, 07:29 AM)Aries-Belgium Wrote: [ -> ]If the numbers don't are like 10 000 prefixes or something the performance isn't really going to be affected.
Did you mean 10000 defined prefixes or 10000 threads having a prefix?
Unique prefixes in the prefixes table.