mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] dw_maintenance 2011-04-25 02:33 am (UTC)

Yes --

It was a small RP community. They had gotten a post up to 1400 comments, which is really nothing, but they were arranged in a chain. Reply, reply, reply, reply. So instead of the normal view of things -- a wide tree -- we had a very, very deep tree.

The part of the code that checks to see if you are subscribed to a thread walks the tree from where you are up to the top to see if you're subscribed to any comment in the chain. Normally, this is simple -- you walk a few comments up and you're at the root and you're done.

In this case, it had to walk 1400 comments. The code was done in such a way that it had to do this frequently, and it caused an explosion of work on Apache, taking tons of memory and CPU. Ouch.

[personal profile] fu fixed it temporarily with some better caching to make sure we don't have to recompute things we already know. We may come up with a better way to do it, but it works for now.

Aaaaaaaanyway. I know I didn't break that down into plate analogies, but I have to run. Maybe someone else can, if needed, and if not, I'll do it later if I remember. ^^;

Post a comment in response:

This account has disabled anonymous posting.
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org