There's more than one way to skin a cat. And I happen to know that's factually true.

Mayor ,'Lies My Parents Told Me'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


brenda m - Aug 19, 2003 4:51:38 pm PDT #4641 of 10000
If you're going through hell/keep on going/don't slow down/keep your fear from showing/you might be gone/'fore the devil even knows you're there

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?


Jon B. - Aug 19, 2003 4:53:11 pm PDT #4642 of 10000
A turkey in every toilet -- only in America!

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.


DXMachina - Aug 19, 2003 5:06:11 pm PDT #4643 of 10000
You always do this. We get tipsy, and you take advantage of my love of the scientific method.

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.


Sean K - Aug 19, 2003 5:06:27 pm PDT #4644 of 10000
You can't leave me to my own devices; my devices are Nap and Eat. -Zenkitty

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.


Kristen - Aug 19, 2003 5:17:09 pm PDT #4645 of 10000

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.


§ ita § - Aug 19, 2003 6:29:52 pm PDT #4646 of 10000
Well not canonically, no, but this is transformative fiction.

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.


Michele T. - Aug 19, 2003 7:12:51 pm PDT #4647 of 10000
with a gleam in my eye, and an almost airtight alibi

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.


Kristen - Aug 19, 2003 7:19:33 pm PDT #4648 of 10000

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?


§ ita § - Aug 19, 2003 7:21:14 pm PDT #4649 of 10000
Well not canonically, no, but this is transformative fiction.

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.


§ ita § - Aug 19, 2003 7:21:28 pm PDT #4650 of 10000
Well not canonically, no, but this is transformative fiction.

Search is down.