21:36, Sunday May 16th, 2004 • feeling relaxed • no comments
Did some optimising of Hype this weekend. When I wrote the new version I didn't think at all about query efficiency, I used DB_DataObject to handle all the SQL and just got on with implementing the functionality required. When I came to do some optimisation the first thing I looked at was the number of queries that were actually being run. Turns out it's about 100 for the home page. Those portlets are data hungry!
The obvious candidate for optimisation was the high scores portlet. The query behind that did a count on the messages for a group (>36,000 for Class of 2001) and grouped them by user. It was taking at least 2.5 seconds for the big group. Once I eliminated that, the other queries take no time at all. Less than a hundredth of a second for a select.
So the actual mechanism of querying MySQL from PHP itself is pretty efficient. The queries themselves can be slow however. I'm going to be timing queries on the MySQL command line from now on, but I won't be thinking of perfomance too much when I next need to trawl something from the DB.
If you're interested at looking at some profiling info for Hype, add ?debug=true to any page URL and check out the tail of the HTML source.
Note: My MySQL server and web server aren't even on the same box, but they are in the same rack.
2:17, Thursday May 13th, 2004 • feeling relaxed • no comments
I enjoyed it. Not the Budweiser mind. I drank about a thousand and still came out only mildly happy. They were £3.50 each as well. Three fucking fifty.
End of rant.
Otherwise it was an interesting evening. I met some people with quite well known blogs, including Simon of Minor 9th, a Guardian blog contest winner and a very nice young man. There were lots of nice people there. We talked about the nature of blogs of quite a lot and the differing views were interesting, blogs as journalism, blogs as publishing, blogs as diaries. Most interestingly, blogs as enterprise tools.
I kind of expecting more people talking about software and sociology and the possibilities for business and large scale projects. There wasn't much of that at all. Which I guess isn't so surprising, the people there were more into personal expression on a techie media than software engineers per se. It's made me really excited about NotCon though!
Incidentally, I didn't talk to Cory. Ladislav did though...
17:32, Wednesday May 12th, 2004 • feeling relaxed • no comments
Little Cocoa app that monitors the room volume via a computers microphone and reduces the system sound when the room volume goes up. The net effect is that if you start talking to somebody, the music goes down in volume. When you stop, the music goes up again.
This is almost certainly too simple and just wouldn't work because of pollution by the music that's playing. But you can tap into the audio output on Mac OS X, so you could filter everything coming from the computer out by comparing the input to the output, accounting for a certain amount of distortion.
16:46, Sunday May 9th, 2004 • feeling relaxed • no comments
Went to the V&A yesterday with Louise. I've been doing so much stuff on Hype we haven't really been spending so much time together and it was our three year anniversary! We've also been talking about going to the V&A for ages, having lived about ten minutes down the road from it for a year and a half.
We didn't stay for very long as we did the usual Saturday thing of rolling up at about half three. We then went into the Bill Brandt exhibition that they're showing pretty much straight away. We quickly detoured around some exhibits from China and Japan though. They had some lovely traditional Chinese furniture and a whole load of Japanese armour and weaponry. They had an unsheathed, dehandled katana blade. It was amazing. I've never seen anything like that. It was so flawless and singular and obviously very dangerous indeed. They had a range of other daisho, katana and wakizashi and some cool suits of armour.
The Brandt exhibition was quite interesting, but quite small. It was chronological as well, so by the time we got to the interesting portraiture and the surrealist nudes our attention spans were waning a bit. Although it was nice to see a side of him that I didn't know.
Brandt started out as a documentary photographer and I found his images of 30s London and the North of the depression very interesting. The pictures of the North on the way out of the industrial revolution were particularly moving. The difference in scale between the people and the world they lived in was crazy, like the people were just crawling between the teeth of cogs in a giant machine. Or as if the technology wasn't capable of building things small enough for humans. It was all really very crude and slightly monstrous.
In the evening we went to dinner with Louise's family at the Bluebird for Louise's Mum's birthday. We had a nice meal with a free glass of champagne, which went straight to my head. Afterwards Louise and I watched Girl With A Pearl Earring which was a nice period movie, but not particularly engaging, the plot was a bit light. Boy is it great to able to plug my laptop into the TV though, much better than watching stuff on a monitor. And the sofa is definitely a far better place to sit still for that amount of time.