Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Sep 2000
Posts: 441
Member
Member
Offline
Joined: Sep 2000
Posts: 441
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

Sponsored Links
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
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.


UBB.classic: Love it or hate it, it was mine.
Joined: Sep 2000
Posts: 441
Member
Member
Offline
Joined: Sep 2000
Posts: 441
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


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)