Tuesday, September 26, 2006

Wild Banshee

I caught a nice bug tonight in Banshee. Every time you switch between sources (Library, playlists, devices, etc) in Banshee, it reloads the ListStore model three times. Reloading is a linear-time operation, so the results below will scale according to how many songs you have.
Here are the seconds it takes to execute everything that's triggered when the ActiveSourceChanged event is raised. I switched fairly quickly between my Library (with 2015 songs) and a Smart Playlist (with 409 songs) before and after my patch:

Ouch! I was probably trying to switch faster than Banshee could keep up with toward the end, hence the drastically increasing times. But even in the more typical case, it goes from about 1 second to 1/20 of a second. Fix committed!
I've been looking into automated testing for F-Spot and Banshee (using Dogtail and Gendarme) for a while. It would be great to track performance regressions and improvements over time, as well as test importing, exporting, code compliance, and more.
Looking forward to seeing and meeting people at the Summit in less than two weeks!