New forums frontpage optimizations available

Cthulhu

Administrator
AKA
Yop
I've made some tweaks and edits and hacks here and there in various plugins and templates. You can now choose to disable the 'Welcome Back' box on the forums home page and the 'Top 10 stats' from displaying in your options, at the bottom of that page.

Turning them off will severely decrease forums front page load times and server load. The 'Welcome Back' box will save 5 queries and, if you have 11,500+ posts like me, reduce the load time from 1 second to 0.1 second (it was 4 - 15 seconds on our old server). The 'Top 10 stats' will save at least 3, if not more queries as well as a number of requests to the server, as these stats are loaded asynchronously, i.e. they're retrieved separately so they don't show up as causing load on the front page itself (but in the background, it does).

I'm inclined to turn these options off by default, even; these plugins all suck in terms of performance and the amount of valid information they supply.
 

Octo

KULT OF KERMITU
AKA
Octo, Octorawk, Clarky Cat, Kissmammal2000
Heres a question, and I dunno if it would make any difference because I know fuck all about these things so apologies in advance: When I go to my user CP it displays the infractions I received that I have since expired/been reversed.....is there any reason to keep this stuff if its no longer active? I mean if it's designed to serve as a warning I totally understand, I just thought maybe some slowdown could be avoided if that stuff doesn't need to be remembered? :huh:
 

Octo

KULT OF KERMITU
AKA
Octo, Octorawk, Clarky Cat, Kissmammal2000
Sorry, I totally forgot about this :monster:

When you click on 'User CP' the first page there has Subscribed Threads and Latest Infractions received (although you might not see this if you've been a good girl!)

I was just wondering if we could save some memory if the database didn't have to remember expired/inactive infractions? It could be that the difference would be negligable though.
 

Fangu

Great Old One
They're not that big of a problem, as they don't do a lot of extraction from the database. The ones that is causing problems are the ones that for example counts through 13,000 rows in the database.

Also, minor tech detail - the database will always keep, or remember, as you say, the subscribed threads and latest infractions. What is removed if those were to be 'removed' is the code that fetches them from the database. It's this 'fetching code' that causes problems if they rely on a query to the database that needs a lot of action to give the wanted result.

Like the plugin Yop were talking about, which basically goes through every single post you've ever written, finds out which subforum it belongs to, counts the number of posts per subforum, and then produces the result 'this is the subforum you've posted the most in'. And that happens every time you reload the front page.

IMO most of the features in a forum like this will be thought through to some degree. But when third parties starts adding plugins and stuff, they can be built in a way that can cause stress if the forum is to be used by a lot of people. That's why it's a good idea to check out the code for the plugins before installing them - if you have the skill to understand how they work, of course.
 

Octo

KULT OF KERMITU
AKA
Octo, Octorawk, Clarky Cat, Kissmammal2000
Ahh right, I think I get it. In any case I've turned off the top 10 statistics and the welcome page thingy and stuff. :)
 

Flintlock

Pro Adventurer
Yes. Do suggest colors / styles, I suck at that kinda thing.

Sorry for the delay in this. I've been playing around with using custom CSS to recolour the links on TLS, and after a lot of tweaking, the colour I've come up with is #7FCFCF. Only on the default "The Lifestream" skin, though; it doesn't stand out so well on "The Lifestream Green", for example.

I just went for something that stands out a little more than the default link colour, and something that works with the general colour scheme. I am using it for all links on TLS now, not just the in-post ones, and I think it goes well with the banner (which is still ever so slightly off-centre, in case you'd forgotten).

Most good modern browsers are capable of changing a page's CSS on the fly (albeit temporarily), so give it a try and let me know what you think. I could also take a screenshot, I suppose, but I don't have time at this very moment.
 

Flintlock

Pro Adventurer
Now I have time for screenshots. Here they are, from a few different places:

aPkmW.png

yNW9Y.png

cYmJk.png

I think the colour stands out from regular text much better, and goes with the general colour scheme of the default Lifestream skin. This is the code I added to my custom CSS in its entirety:

Code:
a { color: #7FCFCF; }

Simple. I think it should be the default link colour :)
 

Fangu

Great Old One
I disabled the stats by accident from the forum front page and now I can't seem to be able to activate it again. I've disabled and enabled but no. Halp?

Edit: Quick links > enable stats did the trick.
 

Cthulhu

Administrator
AKA
Yop
I used some fancy CSS 3 selector to work around vB's terrible html semantics. Seriously, if you ever make forum software, no matter how shit it is, at least give posts a class 'post' or something. Else you'll make me do this:

Code:
div[id^="post_message_"] a { color: #7FCFCF; }

edit: okay spoiler tags were also given the new color. Fixxed:

Code:
div[id^="post_message_"] a:not(.spoiler) { color: #7FCFCF; }

mebbe, for semantics' sake, there should be different colors / styles for normal, viewed, and hover.
 

Ⓐaron

Factiō Rēpūblicāna dēlenda est.
AKA
The Man, V
not a big fan of the way this fucks with my link colour :( i'll fuck with the CSS to fix this later I guess

And yeah I'd go with different colours for hover as well. I might even use a fourth colour for active since so few forums bother with that.
 

Fangu

Great Old One
I just wanted to support Yop in his statement that vB is pain. At least compared to other downloadable PHP packages imo. I'm sure vB is obvious to the people who develop it, but it's structured like a mini project who just grew to 50 times its original size. And they charge for it!
 
Top Bottom