Archive for June, 2007

06/19 700% speedup

I have been cooperating on and off with the good people from Dot.Tunes, based in Australia. I have coded bits of the application, notably the iTunes Library XML file import engine. Back when they integrated my engine, D-T saw huge improvements while importing the XML database, especially with large files. If memory serves, the previous import engine stalled on some files. With the first two or three version of my code, large files took some time to import, but at least D-T didn’t fail. When I mean large, I mean real large. Like 50,000 record-large. 35MB+ of XML to digest and convert to sqlite. Gulp.

50K records took, give or take, 20 minutes. Note the use of past tense. Took. Now, it takes 3 minutes. Yessir. On the same machine. But to achieve that I had to break out the big guns. The real big ‘uns. I had been playing for a while with the idea of writing some iTunes/mp3/etc related code in Erlang and possibly Yaws. So one of the things I started writing is a new engine for the iTunes Library XML format, using message passing, concurrency and gazillions of lightweight threads.

The result is astounding. 2,000 records take 2 seconds on my MacBook, and/or a late-model PowerMac G5. 50,000 records take three minutes on that same PowerMac G5 – I don’t have yet the file to make the tests, and I am quite curious to see how the MacBook will fare. To be fair, there’s extra overhead then to inject the .sql file into an sqlite database, but it’s minimal. The only problem is that we’ll need to ship CEAN, a stand-alone version of Erlang. That adds +/-12MB to the package, but I think it’s well worth it.

We’re still in the testing stages, and Jeff over at D-T will certainly make announcements when we’re ready, but I am already quite excited by the progress we’ve made….

06/16 Terribly unfun

The last few weeks have been totally not fun. While touring Asia, 3 countries a week. Doctor is amazed, and regards me as a mild head case, I think. Then again he knows my boss, so he is kind of aware of how hard we work…

I have been during the last hmmm, 10 weeks, on two trips to Asia – note that I am technically based in Hong Kong, but A/ I still buy return tickets from Bordeaux, and B/ all my stuff is still here – with one week in the middle back home. I clocked in 40,000 miles in this period, got my mileage card back to Gold, thankyouverymuch, on my way to Platinum. Drawing a map like I did before would be close to impossible, suffice to say that during this period I “resided” in Hong Kong – had a monthly rental plan at a hotel – and visited Seoul four times, Shanghai [hated it], Kuala Lumpur, Singapore, Taipei and Tainan, and Shenzhen numerous times. But then again when visiting Shenzhen I don’t get any mileage, since I take the train or a bus…

I missed round one of the presidential elections, and round one of the general elections. I voted during the second round of the pres elections – for Sarkozy, no less – and will vote tomorrow, if I can find my voter’s card. [found it. cool]. Not that I care[d] too much about the results as they were foretold anyway, and I won’t be here to “enjoy” the show. I guess I am just happy the country is getting a healthy dose of medicine while I am away, and thus will avoid the convulsions.

Not that I am planning to go back to France ever. We’re selling our place, closing our bank accounts, and while we’re happy for the almost three years here, it’s time to pack up and go. Enough is indeed enough. And Sarkozy is anyway too little too late, probably…