>100 in-testsuite+ bugs in MailNews Core & Thunderbird

A discussion at our status meeting last week, prompted me to take a look at how many bugs MailNews Core and Thunderbird have marked as in-testsuite+. I was pleased to see it was just reaching 100.

(For those that don’t know, we mark a bug as in-testsuite+ when we have an automated test that covers that bug).

I committed the first in-testsuite+ bug for MailNews in November 2007, this covered some very basic address book functions. Since then we’ve grown the tests to cover address book (more extensively), POP3, IMAP, SMTP, NNTP, bayesian spam filter, aspects of message composition and sending, gloda (the new search database), text import of address books, searching messages, folder management, and a few other things.

Although our actual code coverage of these areas is not very big, we do cover a lot of different areas of MailNews with these tests. Our major protocols are covered (to a limited extent) with the use of fake servers – as a result of the password manager switch, we also have basic authentication tests for these protocols. So if someone breaks something significant, we’re much more likely to know about it before it even hits the nightly builds.

We’ve never (yet) had a policy of all patches requiring unit tests, because for Thunderbird we haven’t got the same testsuite possibilities as Firefox – mainly due to the lack of a browser interface. Various solutions have been proposed and partially investigated, I expect we’ll be looking at the chrome/UI area of testing more after we release Thunderbird 3.

We’re going to be looking at how to encourage writing more unit tests, and what we can do to make writing them easier, so keep watching.

I’d like to say thank you to all those that have written unit tests for MailNews so far. Keep going, unit tests have, and will make Thunderbird & SeaMonkey better products.

Jemalloc comes to Thunderbird on Windows

For a while now I’ve had a task on my plate to enable jemalloc for Thunderbird on Windows builds, after confirming it doesn’t regress performance.

A few weeks ago, I managed to finish writing a start-up performance test (although still run manually) for Thunderbird, and with thanks to a couple of volunteers, start-up speed showed a reduction of about 2-3% for a warm start.

Our bloat tests (which are currently quite simple) showed slightly reduced allocations. Although not as definitive as I would have liked, knowing the improvements that jemalloc helped make with memory management on Firefox it should be a great bonus to Thunderbird. I think the main reason it didn’t show much of an improvement is that our bloat tests are currently quite limited and short-running; Over a longer session a bigger improvement should be seen.

We finally pushed the patch to enable jemalloc last Friday, so Windows nightly users should already be running with it, and it will be included in Thunderbird 3 beta 2. This should be (at least) a small performance bonus for Windows users.