Friday, March 30

Blog

Timing Is Everything

70ms for the main page without comments.
150ms with comments.
96 comments displayed (including the Recent Comments thingy).

Hmm. A bit disappointing, considering this is the fastest hardware I'm likely to get this year.

I just hope that Ace, who has 200+ comments on individual posts, doesn't try to do inline comments.

Update: Well, it's not broken, just a bit poky at certain tasks. An individual entry page takes 5.7ms (elapsed time) if you remove the Recent Comments. 2.9ms of that is the SQL queries. The forum page sans sidebar takes 54ms to list 20 posts; 6ms for the queries. (The query times are for cached queries; uncached takes longer in elapsed time, but that doesn't come into CPU efficiency of the application code.)

If I tweak the forum listing to include the body of the post, it takes exactly the same amount of time to within the limits of precision of the built-in timer. Which shouldn't be surprising I guess; all the data processing is done whether the template needs it or not, and Python's string processing is very efficient. It does point to where I need to concentrate my attention, though.

Update: Adding the planned [topics] selector and the associated [topic] data tags reduces the time for a forum page sans sidebar to 13ms. The sidebar adds another 13ms. Extending it from 20 to 50 topics pushes the time out to 42ms: about 500μs per topic, compared to about 2ms per entry.

Posted by: Pixy Misa at 12:06 PM | Comments (7) | Add Comment | Trackbacks (Suck)
Post contains 245 words, total size 2 kb.

1 Ace and the Jawas are the smoke test. If you can survive them, you can survive anything.

Posted by: Steven Den Beste at Saturday, March 31 2007 12:16 AM (+rSRq)

2 Both Ace and the Jawas are already running an early version of the Minx comment system, because MT comments folded up under the strain.  The full version has a lot more features and so is slower, but it isn't enormously slower.

Here's the result from an Ace post with 295 comments on the old system:
Processing 0.13, elapsed 0.1542 seconds.
15 queries taking 0.0494 seconds, 304 records returned.
Page size 185 kb.
Powered by Minx 0.7 alpha.

Posted by: Pixy Misa at Saturday, March 31 2007 03:58 AM (PiXy!)

3 Did you ever puzzle out what was causing the input lag in high comment count posts? There have been a lot of 200+ posts over there lately, and the lag gets really noticable beyond that point.

Posted by: Will at Saturday, March 31 2007 11:38 AM (olS40)

4 ...

Input lag?

If you entered something in New Comments Thingy, it wouldn't update the main page or the entry page, but it updates the New Comments Thingy page right away... Unless it still has caching enabled... Which would affect everyone but me, because it doesn't cache if you're logged in... surprised ops:

Posted by: Pixy Misa at Saturday, March 31 2007 12:08 PM (kdEVa)

5

Well I had noticed a problem with the comment count on the main page not updating (new posts show 0 comments for quite a while), but what I was actually referring to is a noticable lag between entering keystrokes and the letters appearing on the screen in the text box of the New Comments Thingy.

I've been watching the CPU Usage in the Task Manager while typing a comment on a couple threads over at AoSHQ, and it spikes when you begin typing a comment in a thread that already has about 150+ comments. If you just keep typing away furiously, none of the text will appear until after you've paused and given it time to catch up.

The more comments, the worse the problem gets. I don't know if it's a problem with the comments system or maybe IE (or other browsers) interacting with the comment system. Several people have remarked on it over at Ace's, so it can't be just me. Try his recent open thread and see if you observe the same thing happening.

Posted by: Will at Saturday, March 31 2007 04:43 PM (SOx9v)

6 Oh.

No, I don't get that at all.  But I use Firefox.  Let me try it in IE...

Gak!!!  That's horrible!  What the hell?!

I'll definitely look into that.  But the editor itself works fine on IE, so I don't know why it would suddenly blow up on long threads.  It shouldn't make any difference.

Posted by: Pixy Misa at Saturday, March 31 2007 04:55 PM (PiXy!)

7

Well, you're certainly right.  It only seems to happen in IE, and only on longer threads.  I even tried the "view page in IE" plugin I have installed in Firefox, and it worked just fine there.

Very weird indeed.

Posted by: Pixy Misa at Saturday, March 31 2007 05:06 PM (PiXy!)

Hide Comments | Add Comment

Comments are disabled. Post is locked.
49kb generated in CPU 0.0407, elapsed 0.2213 seconds.
56 queries taking 0.1959 seconds, 342 records returned.
Powered by Minx 1.1.6c-pink.