announcements

Ender [1]
Administrator
2013-07-24 22:58:36 🔗
[11 years, 158 days ago]

The documentation page has historically been notoriously slow because of all the aggregate stats it computes on the fly, often taking 10-20 seconds to load (and likely affecting load times for other players on other pages). These stats are now cached so that they will be computed at most once per hour, thus greatly increasing the page's speed when the cache is hit.


 
Trio [327]
2013-07-24 23:11:07 🔗
[11 years, 158 days ago]

Yay so now theoretically the 20 second load time will only be once per hour total.


 
Jans [87]
2013-07-25 01:33:27 🔗
[11 years, 158 days ago]

caching ftw


 
New Alan [100]
2013-07-25 08:27:25 🔗
[11 years, 158 days ago]

Trio, the 20 seconds would be completely on server side. You won't even know it happens most likely.


 
shoyuken [175]
2013-07-25 08:38:59 🔗
[11 years, 158 days ago]

Hmmm.... so the page only loads fast if it was already cached, but if you are the first person to check the documentation page in the last hour it'll still be slow.

Note: These values are cached and therefore may be out of date.
[last computed 21 seconds ago, eligible for recomputation in 3,579 seconds]

 
Jans [87]
2013-07-25 09:40:36 🔗
[11 years, 158 days ago]

Yea, that's how caching generally works. If 100 people visit a page, instead of generating the same page 100 times, it's generated once for the first visitor, and stored in cache (file or memory) so it's ready to use for the 99 others.

After a while, the cache is cleared, so a new one needs to be generated. Which happens at the next visit. So if the documentation section is visited only once every 1,5 hour or so, no one will ever see a cached version :)

I just looked, and got a brand new version as well;
Note: These values are cached and therefore may be out of date.
[last computed 0 seconds ago, eligible for recomputation in 3,600 seconds]


 
Leader2 [136]
2013-07-25 12:36:55 🔗
[11 years, 158 days ago]

good work ender although who shall be the unlucky one and have to wait that 10-20 seconds


 
New Alan [100]
2013-07-25 18:24:00 🔗
[11 years, 157 days ago]

It could be a cron job. It refreshes itself every hour.


 
Fishwick [131]
Moderator
2013-07-25 20:57:20 🔗
[11 years, 157 days ago]

"Eligible" suggests otherwise


 
Port Royal [247]
2013-07-26 06:02:05 🔗
[11 years, 157 days ago]

Note: These values are cached and therefore may be out of date. [last computed 0 seconds ago, eligible for recomputation in 3,600 seconds]

I was the unlucky one!


 
Jans [87]
2013-07-26 16:10:29 🔗
[11 years, 156 days ago]

me too
[last computed 0 seconds ago, eligible for recomputation in 3,600 seconds]

maybe a cronjob isnt a bad idea :)


 
DarkNinjaMaster [76]
2013-07-26 21:08:14 🔗
[11 years, 156 days ago]

Doubt more than one person an hour checks it really.


 
Esvrainzas [134]
2013-07-28 07:25:17 🔗
[11 years, 155 days ago]

[last computed 0 seconds ago, eligible for recomputation in 3,600 seconds]

I guess DNM is right...


 
shoyuken [175]
2013-07-28 15:05:28 🔗
[11 years, 154 days ago]

i support the cron job

Note: These values are cached and therefore may be out of date. [last computed 0 seconds ago, eligible for recomputation in 3,600 seconds]


 
User Name [306]
2013-07-28 16:28:41 🔗
[11 years, 154 days ago]

Yeah, It sucks being that one guy.

Note: These values are cached and therefore may be out of date. [last computed 0 seconds ago, eligible for recomputation in 3,600 seconds]


 
Leader2 [136]
2013-07-28 17:43:54 🔗
[11 years, 154 days ago]

Whats the average amount of visits to that page per day? it can't be that many if you guys keep having to wait so long


 
Ender [1]
Administrator
2013-07-29 20:01:36 🔗
[11 years, 153 days ago]

I'll look into automatically populating the cache.


 
Ender [1]
Administrator
2013-07-30 00:13:08 🔗
[11 years, 153 days ago]

There doesn't seem to be a way to do low-priority/background SELECT queries in MySQL. These queries are the source of the slowness, so the naive approach of automatically triggering it every hour would probably cause a noticeable slowdown for other requests during the refresh window (I have not actually verified this though).

Automatic cache loading may still be worth investigating, but for now, I've simply bumped up the cache lifetime so that the stats are loaded at most once per day (up from once per hour).


 
Gandhi [41]
2013-07-30 00:14:59 🔗
[11 years, 153 days ago]

How about letting us force/ask for a refresh of them?


 
DarkNinjaMaster [76]
2013-07-30 02:14:36 🔗
[11 years, 153 days ago]

Heck make it once a week. No-one really needs stats that hardcore do they?

*hides*


 
Jans [87]
2013-07-30 03:46:29 🔗
[11 years, 153 days ago]

Liar, you like to check your spamcount after every post.


 
Leader2 [68]
2013-10-05 19:21:10 🔗
[11 years, 85 days ago]

Note: These values are cached and therefore may be out of date. [last computed 0 seconds ago, eligible for recomputation in 86,379 seconds]

how shit does it actually feel when it happens to you :(


 
DarkNinjaMaster [41]
2013-10-06 07:56:33 🔗
[11 years, 85 days ago]

If this makes you feel shit, don't watch the news, or go outside.