Skip navigation

Daily Archives: October 16th, 2008

Yesterday dietrich was telling me he was seeing a lot of writes to places.sqlite and places.sqlite-journal. I wanted to get good, hard data to see what was writing, and how often we were doing it. I figured this was a good option for DTrace, but I've had mixed experiences with it in the past. I first turned to Instruments on OS X, but that can't give you stacks for calls, so I had to dump it.

I talked to dolske, who happens to be the resident DTrace expert around here. With his help, I was able to put together this little D script to track writes to the files in question, and give me user stack traces so we know who is writing and when. With this, we've figured out what was writing, and are working on how to make it write less as we speak.

DTrace really is an awesome tool, even if it can be a bit awkward to use from time to time.

It’s been a bit more than three months since I wrote about the asynchronous storage API landing in mozilla-central. As far as I know, there are still no consumers of it in mozilla-central, but I do think that the Thunderbird folks are using it (they’ve been filing several bugs about it). We were looking at using it in places to help with the fsync issues we’ve been working with, and noticed a major flaw to the API. You cannot perform more than one statement at a time in a specific order asynchronously without jumping through a number of hoops that happen to also be on fire. Enter bug 458811. That landed on Monday, so now it’s easy to do – just call mozIStorageConnection::executeAsync and pass it an array of bound statements. Hope others find this just as useful as we did!