June 12, 2006

Whee!
It works!
Rather than writing everything from scratch to start with, I put together what I had and pointed it at our existing Movable Type database (which has a number of changes over the original, admittedly). And it works.
40 milliseconds is a bit depressing, though. I'll have to see if I can speed that up a bit.
Okay, some timings: Last 200 entries at Munuviana, with inline comments: 420ms. Without inline comments: 90ms. Having inline comments causes a lot of extra SQL queries; I don't know if it's that or the text processing that's taking the time.
A normal page only shows 20 entries, and takes around 45ms with comments and 15ms without. It's a bit hard to time that more precisely, which is why I bumped the page size up.
Every post and comment has to be passed through the template engine; every comment is also processed through a SGML parser to strip out unwanted or invalid HTML tags. I'd love to get a complete page out in 10ms, but I don't think I can. Well, if it's cached, then sure, but not if the whole thing needs to be dynamically generated.
<Pause.>
<Goes off to implement caching system.>
...
<Comes back again.>
Retrieved from cache, processing time 0.0 seconds.
Yeah, that'll do.
Only problem is that saving the text up to be cached takes an extra 10ms or so. I need to try the StringIO/cStringIO functions and see if they help.
Update: cStringIO provides no performance advantage at all. Which is good in that I know that the easy way to code it is just as efficient, but bad in that I can't speed it up at all.
Posted by: Pixy Misa at 05:27 AM | Comments (4) | Add Comment | Trackbacks (Suck)
1
Shit, I didn't know memcached worked that well.
Posted by: Jojo at June 12, 2006 11:53 AM (k4GMe)
2
That's not even using memcached; that's just a MySQL table. (I have memcached on the dev box but not on the production server yet.)
The resolution of the timer is 10ms, though, so take it with a ±5ms grain of salt.
The resolution of the timer is 10ms, though, so take it with a ±5ms grain of salt.

Posted by: Pixy Misa at June 12, 2006 12:09 PM (O0soJ)
Processing 0.0, elapsed 0.0059 seconds.
16 queries taking 0.0034 seconds, 24 records returned.
Page size 9 kb.
Powered by Minx 0.8 beta.