June 26th, 2000

belize

LiveJournal & Blythe

Working on LiveJournal, finding performance bottlenecks & fixing them ... optimizing stuff is my favorite part about programming and system design, so I'm having fun. It's so rewarding to watch something run in milliseconds after watching it previously run in several seconds. Also talking to Blythe ... I get to go see her in 3 days. As Brian and Dana would said, "Yippeee!!!"
belize

Fast, at last.

Finally I am happy with the state of LiveJournal's back-end. Sure, there are tons of features that need to be added (and that's the easy part), but until now I'd have reservations about the speed of the database and some of my code. I'm now satisfied and will begin to add tons of fun features. :-)
belize

Sleep? Naah.

I was really planning on going to bed early tonight, but the past few hours I keep finding really cool things that I could change in LJ to make it faster. I've sped up the "recent entries" display page in the same way I sped up the friends page the other day, but now I realize there are other places in the code where I do similar slow queries (like when you're in the windows client and select to modify the most recent entry) that could be improved by abstracting my "get the last n entry IDs of { lastn | friend } type" code. so that's the current project. it'll involved rearranging a lot of the code, but it should be a lot quicker in the end.
belize

db bugs & bedtime

I was getting a lot done, but then I found a bug in the new version of MySQL. I was thinking about just being pissed off and finding a way around it, but instead I took the time to join the MySQL mailing lists and send in an intelligent and detailed bug report... hopefully it'll get fixed. In the meantime, I think I have found a way around it, but I'm tired and don't care now. I'm going to bed.
belize

Grrr

Yes, LiveJournal was down all morning, but you should've seen how fast it was before it crashed! *sigh* The problem is MySQL crashing whenever it does something complicated..... I've sent in a bug report and they're apparently working on it, analyzing LiveJournal's database files. In the meantime, I'll be improving my "watching-LiveJournal-while-I-sleep" script to be aware of more potential problems (like the database server dying) ... currently it only checked for the web server being retarded.
belize

Hell fuckin' yeah!

So you know how I was complaining about MySQL having that bug last night? I sent in my intelligent bug report (it's amazing how many clueless users there are on that list) with my table definition and a test case which crashed it and last night I was contacted by them asking me to upload to their private FTP area my table files .... I did that, and now they just sent me a patch which fixes it ..... they're frickin' amazing. Time to patch mysqld and get workin' on LJ again....
belize

Very Happy

I'm very happy right now: the database is working again (thanks to the prompt bug fix from TcX!), I got two DVDs in the mail from LiveJournal users jvkc and deirdre, and my monthly check from FreeVote.com advertising came ... time to make a trip to the bank. :-) :-)
belize

.. more livejournal speed-ups

One of my favorite ways to optimize database applications is to enable db logging and then just tail the log file and watch how many unecessary queries are happening, then go try and clean them up. for instance: I noticed that if you were logged in and went to look at your own journal, it would pull your user record twice from the database: once to render the page, which is always necessary, but then also once to verify your login password with your login username ... I rearranged a bunch of code and now it pulls the full page owner's user record first (before it was doing remote user authentication first) so then when it comes time to authenticate the user, I can check and see if the remote user is the page owner, and thus prevent an extra query.
belize

dead

Current Mood: Dead Fawkin' Tired. Think I'll be going to bed now .... didn't really sleep last night. The remaining LiveJournal optimizations will have to wait.