Site performance

Is the site unusually slow at the moment? Or is it just me?

No it’s slow, better than it was earlier though, seems to be coincidental with think Optimus Trousers reemergence

Had issue with it all evening - slow to load pages.

It did, but I don’t understand why. I basically present an API to papster who then grabs my data and sticks it in a thread.

It shouldn’t matter how a change my code, as pap’s code hasn’t changed.

What is different is the amount of stuff that OT posted. As he’d been off for a couple of days, there were lots of new articles.

But once it got uptodate, which it did within a few minutes, it should have stabilised.

Odd.

papster is on the case…

Yeah, I’ve had a look. There were definitely a couple of things that could have affected some of the Latest Topics code. The links between topics and tags was a big fragmented, which I’ve sorted. I also restarted the site a bit, and we’re a bit faster than we were, still nowhere as fast as I would like.

Yep definitely quicker response now. I have a very quick broadband connection (150mb/sec) and clicking on “latest” was taking 15 sec + to load earlier. It’s about 5 secs now.

I like this site, the open nature of dialogue gives me hope for the Middle East and the shite pub situation in Hedge End and Millbrook…

And you get all this from the site loading slowly?

That’s very deep, Barry.

On a go slow again this morning…very slow :slight_frown:

It’s blazing fast, at the moment, for me

Died a death in the Philippines for some reason cannot even see old posts on some threads Ie the Moriniho should apologise one

Ok, I’ve made a change to the number of topics that we show in Latest Topics.

Now 10 per page. it was 20 - it should give the homepage a lot less to do.

Small update. A number of changes have been made to address things.

First off, we noticed that the “Latest By” link was not doing any real paging. It’d load the entire thread, which on something like Optimus Trousers, which is replete with content, that was taking a long fucking time.

It has been disabled. It was never really required after the visit code went in, and while it probably suits the kind of threads that develop on Q+A sites, it’s no good for the sort of long-running threads we have here.

Now I don’t know how many people were using Latest By, but just a couple hitting big threads could have had big implications for other people using the site. Seems to be running loads faster now.

OK, well I’m going to see if I can turn trousers on again *.

* Double entendre police to the Site Performance thread please!

I’ve pulled my trousers* down again.

Whilst Optimus trousers isn’t the problem, per se, the fact that Optimus trousers’ thread is now so long is exacerbating the performance problems we’re having. But the same is true of any long threads we have.

The performance of the site will still be poor on the home page until the Optimus trousers thread has made its way off the home page. So get posting and push it down the latest thread list, at which point things should speed up.

Papster is working on a couple of options to fix this and will tell me when I can pull my trousers up again *.

* Double entendre police to the Site Performance thread please!

Well the thread bumping certainly seems to have helped.

(Now if you had a proper DB that was properly indexed you could write proper SQL to get what you wanted much quicker…)

It’s got bugger all to do with size or indexing; just some curious design choices that we’ve exposed with the way we run this site.

Remember that this is basically an open source take on StackOverflow. At its heart, it is more a Q & A site than an actual discussion forum. I think the original devs never expected huge threads, which accounts for most of the slowness.

They’ve basically coded it so that it makes logical sense from a developer’s point of view, which is not always what you want when performance is your key goal.

An example. That Latest Topic page currently works by:-

  1. Loading the n most recent topics

  2. Loading all posts attached to those topics

  3. Loading all votes attached to those posts

Step by step, it makes utter sense, but there is a chasm between what we actually need and what we pull back. The only reason we’re pulling votes is to get an up/down count. That is one of the big reasons it pulls all the posts.

I’m working on replacing the main pages that show topics with alternatives that’ll load a ton faster. I’ve done this by considering only the fields we need to load that page. I would expect most performance problems to completely fall away at this point.

1 Like

Sorry Pap, was a little dig at Bletch there, not meant to cause offence…

So, from your description, does the up/down count only include votes from the Topics on the front page??

No offence detected, BBB. I was merely dumping my investigation somewhere.

The leaderboard vote count incorporates everything. I was just explaining that the code was going a really slow way about getting the counts that are visible on the home page.