Attention Mozilla Test Writers!
by nakubu at 2011-08-12 15:54:34

We've just introduced a change to Mozilla's Mochitest harness to improve test run times, as per Bug 367393. This involved the removal of unnecessary MochiKit usage. We found that we were including a minified version of MochiKit, packed.js, in all our tests and within the harness, but we would only use a small portion of this enormous suite. That added an extra load of about 5 minutes per debug test run, so we removed MochiKit from our harness and added replacement functionality to SimpleTest. Note that the SimpleTest.js file in MXR may not yet be updated, so pull the latest mozilla-central code to see latest changes!

What this means for you: If you're writing a test that doesn't require MochiKit, please do not include packed.js in your test. This just adds extra load. If your test does require some part of MochiKit, please check if that functionality isn't already part of SimpleTest. If it isn't, then include the only the relevant parts of MochiKit (ex: <script type="text/javascript" src="/MochiKit/Base.js"></script>) instead of pulling in all of packed.js.

Related tags:
mozilla, mochitest, mochikit

Cameron McCormack says:
2011-08-28 22:33:47

Nice work!



name (required):

email:

url:

comment:


Find the squirrels below!