Sunday, January 14
I have 120 Apache threads running non-stop and bandwidth up 100% over normal, and who do I have to thank for it?
Idiots searching for pictures of Jessica Alba and Elisha Cuthbert and ending up at the Jawas.
The Jawa Report is still running on Movable Type, but using an early version of Minx for comments. It seems that Rusty wanted the Minx comments to show up in the Movable Type generated pages - a reasonable enough desire, and one easily implemented with a PHP include_once statement pointing at the appropriate Minx page.
Suck it out of Minx, paste it into the HTML, let CSS do its wizardry to make the formatting work, and out it pops.
Problem 1: The early version of Minx that I set up for Rusty didn't cache individual posts, so that it was generating the pages from scratch every time. Which wouldn't really be a problem - Minx is pretty quick in any case - except for -
Problem 2: The include_once statement was placed where the old comment code had been in the template. Inside the loop. So if there were ten comments, the include_once would appear ten times. A minor defect, you'd think, and you'd be right if it weren't for -
Problem 3: PHP provides the include_once statement for the case where program A needs programs B and C, and programs B and C both need program D. include_once prevents you from getting two copies of program D. But that's just the end result; in the process of doing this it actually opens the file containing program D twice. Then it throws away the second copy. So the page with ten comments fired off ten requests to Minx, one after the other, and then threw nine of them away. And that too would have been fine; it would just have taken 100ms instead of 10ms to deliver the result, except for -
Problem 4: One recent (and popular) post at the Jawa Report has 786 comments at last count.
The server didn't melt. Quite.
Posted by: Steven Den Beste at Sunday, January 14 2007 08:49 PM (+rSRq)
Posted by: Steven Den Beste at Sunday, January 14 2007 09:59 PM (+rSRq)
Posted by: TallDave at Monday, January 15 2007 01:38 AM (odS+4)
Posted by: Shawn at Tuesday, January 16 2007 10:36 AM (0fskM)
Posted by: kristopher at Wednesday, January 17 2007 12:38 PM (jcvPd)
Posted by: Pixy Misa at Wednesday, January 17 2007 10:43 PM (GaSFI)
But, at least, the image search show our beloved Jessica apparently loving to 'read Muhammed cartoons"......whatever that means ;-)
Posted by: Rusty at Thursday, January 18 2007 07:56 PM (JQjhA)
Posted by: Pixy Misa at Thursday, January 18 2007 08:50 PM (GaSFI)
51 queries taking 0.0124 seconds, 222 records returned.
Powered by Minx 1.1.6c-pink.