1. Can we get rid of the random quote generator?
Kristen, do you mean the quotes at the top of the page or the BRQG, which is on a separate page? Or is that one housed on shrift's site?
Mayor ,'Lies My Parents Told Me'
Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.
1. Can we get rid of the random quote generator?
Kristen, do you mean the quotes at the top of the page or the BRQG, which is on a separate page? Or is that one housed on shrift's site?
First off, we're doing better. But we're still not where we need to be.
Can you be more specific? Did the changes help a lot? Just a little? How much?
To those who know more about coding than I:
Maybe we could code a Quote of the Day function? Every day at midnight, a job would run that would pick a quote at random and write it to a file. That file could easily be inserted into the upper right corner of our pages.
We'd still get random quotey goodness, but only once a day instead of with every page load.
t edit Brenda -- Kristen means the thing in the upper right.
Yeah, if losing the random quotes helps with the resource issue, I'm all for it. In fact, I already suggested it. Go me! :)
DXMachina "Buffistas Building a Better Board" Aug 3, 2003 4:29:15 pm PDT
Really, it's probably one of the least painful things we would have to do in the scheme of things. And Jon's suggestion for replacing it is a pretty good one. Wouldn't even have to be a random quote. Just pick the next one in line each day until you run out. The way randomization works around here, you might wind up with the same quote three days in a row.
Maybe we could code a Quote of the Day function? Every day at midnight, a job would run that would pick a quote at random and write it to a file. That file could easily be inserted into the upper right corner of our pages.
Even a quote an hour would be less of a drain than a new quote for ever user for every page hit.
But I'm more than happy to do without a new quote every refresh/page.
In fact, there have been a number of times that the quote caught my eye after I'd already clicked, and I would have liked to read the full quote, but once the page is gone, quote gone too, and I have to wait until the quote pops up again randomly.
Can you be more specific?
It's hard to be specific since resource usage isn't something that gets monitored the way storage and bandwidth do. They check activity in root ssh and get back lines of this:
| 425990 | bufforg_buffboar | localhost | bufforg_buffboard | Query | 0 | Sending data | select COUNT(post_number) from posts where post_date = '2003-08-19 18:04:14' AND post_number '>' 0 AND |
When they see a lot of them, they know something is wrong.
Did the changes help a lot? Just a little?
The changes helped a little. The new server helped a lot. The fact that the changes didn't make a dramatic impact is what's making me thing there's a glitch somewhere.
Oh and another thought I had. I know when we were discussing default things earlier, it was mentioned that the default number of posts per page is 10. Can we up that number? Because, while regular Buffistas will set probably their number to something higher, I'm thinking about the non-registered readers we get. For example, when we get linked to at Whedonesque or wherever and a bunch of people come over to see what Joss said. It might be better for us if they saw more posts per page and had to click next less.
Jon B's suggestion for QotD could be done, which'd mean that MySQL would be hit once a day, period.
Kristen, bots are blocked (or should be, if they play nice) from the thread pages. So they see the front page, the link page, the archives ... low load stuff only.
Also, as for connections staying open -- I can't imagine how one would keep a connection open across pages without totally hacking PHP. As of right now, the DB connection function looks like:
function connectAndQuery($query) {
$db = db_connect();
$result = mysql_query($query) or trigger_error("$query failed: " . mysql_error(), E_USER_ERROR);
if (func_num_args() < 1) {
db_disconnect();
}
return $result;
}
func_num_args() is < 1 at just once in the code ... while a post is being committed. Which means the connection is dropped IMMEDIATELY for every other database open. I'm flummoxed as to how that couldn't make a difference, or that could be changed.
Except by making fewer calls total, and shorter ones -- and yes, the SQL is going out to the askees soon.
Default posts per page? I can change that right now, for unregistered users. Gimme a sec.
I promise it won't hurt a bit.
If we did the random quotes in something other than SQL, would that help? I use a simple PHP random quote generator that's like two lines of code, total.
I think that as long as it's not opening a connection to the database, we're fine. So that might be a good idea. We can keep the generator without the database hits.
Oh and I wanted to ask...search isn't active right now, is it?
What's the size of the source file it pulls from? I was told that a non-SQL solution for a similar volume would be slower, since it's all file reads, whereas the SQL solution would use more RAM caching.
Of course, that's the problem, isn't it?
I think we should just go really light. But I never read the quotes.
Search is down.