UBB.Dev
hello there,
i figured out that a bunch of users do have within their profile-settings the preference of threadviews set to 'show all postings': this leads to HIGHLY cpu-problems so i would love to limit this to 'show all threads since the last 90 days': so my questions are: how to limit this so future users may choose a max of 90 days, but the most important question seems to be: how to change automatically the state 'show ALL topics' inside all already registered users profile to a max of 'show latest posts from the last 90 days' ?
bigup!
chris
Actually, limiting the number of days won't help performance much.

What you really need to do is remove the DaysPrune option entirely, then locking it to Show All (which is a really easy code change).

This sorta seems like the exact opposite of what makes sense in other boards, but let me explain.

We don't have a database, we have a bunch of index files. In order to generate the list of topics, we have to load the entire index, then sort it, then cut it off based on DaysPrune, then cut it off at the page we're looking at.

But in any case, we already have the entire sorted list.

In database products, specifying a smaller DaysPrune window would change the SQL query, resulting in less work for the SQL server, resulting in usually more speed. So specifying a pretty low DaysPrune there would make more sense.

So, by forcing everyone to see all topics, you actually save work. And on top of that, you also increase cache hits - now there's only one possible instance of the forum topic list rather than one for each possible DaysPrune. Performance boost. smile

Anyway.

So task 1: Nuke DaysPrune. Simple...

ultimatebb.cgi, find where %in is declared - it's a map. Right under it, enter:

$in{'hardset'} = 1000;

Then for the Accelerator... in ultimatebb.php, find

$TheFile = "";

And above it, enter:

$hardset = 1000;

That will cause the board to totally ignore DaysPrune entirely. Then you just need to remove the select list from the edit profile / registration templates (replace it with a hidden input with a value of 1000), then remove it from the forum template entirely.

And if your server is still getting thrashed... remember the general rules about Classic performance - try to keep less than 3000 topics in a forum (use the Mass Move tool to create read-only archives), turn off Recent Visitors, and prune away members.
charles, thank you so much for your reply and that detailled explanation and these information. so, in short / in sum: users having selected the 'view ALL posting'-feature won't have a negative effect on the stability and performance of my bbs? in other words, so even this could even so a better performance because it's a not an sql-based -thing..? well, if this is right i won't do ANY changes at all, i just was afraid that users viewing 'all topics' would slow down my bbs.
again, thank you SO much!!!! :-)
chris
© UBB.Developers