Closed
Bug 753752
Opened 13 years ago
Closed 13 years ago
Eliminate wait between application start and first test
Categories
(Testing Graveyard :: Mozmill, defect)
Testing Graveyard
Mozmill
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: whimboo, Assigned: cmtalbert)
References
Details
(Whiteboard: [mozmill-2.0+])
Attachments
(2 files)
Right now there is a delay after the application start and the first test execution. We should get this eliminated to speed up restart tests. From my feeling this delay is currently about 3 seconds.
Reporter | ||
Updated•13 years ago
|
Assignee: nobody → ctalbert
Status: NEW → ASSIGNED
This changes the gathering of the addons and startup information into one call across jsbridge which saves us about 6 seconds. I went ahead and left my instrumentation for the timer in utils.js because it might be useful for future optimizations. Nothing really calls it right now, so at worst, we have one global variable hanging around for the timer value.
Attachment #638929 -
Flags: review?(hskupin)
Reporter | ||
Comment 2•13 years ago
|
||
Comment on attachment 638929 [details] [diff] [review]
Patch v1
This patch is great and improves the performance a lot. With it applied I'm more than happy Clint! One caveat for now is that the diff is against a really old version of master, so it doesn't apply and break Mozmill. I will make notes of all the entries which have to be updated and will come up with a followup patch today so we can get this landed asap.
>+ """ Collect application specific information """
>+ mozmill = jsbridge.JSObject(bridge, mozmillModuleJs)
>+ jsz = mozmill.getApplicationReport()
>+
>+ tmpjson = json.loads(jsz)
>+
>+ results = {'application_id': tmpjson["appinfo"]["ID"],
>+ 'application_name': tmpjson["appinfo"]["name"],
>+ 'application_version': tmpjson["appinfo"]["version"],
>+ 'application_locale': tmpjson["appinfo"]["locale"],
>+ 'platform_buildid': tmpjson["appinfo"]["platformBuildID"],
>+ 'platform_version': tmpjson["appinfo"]["platformVersion"],
>+ }
>+ results['startupInfo'] = tmpjson["startupinfo"]
>+ results['addons'] = tmpjson["addons"]
>+ return results
A lot of things have been renamed meanwhile on the Python side. Those will need an update. Also mozmillModuleJs doesn't exist anymore and will break the JSBridge connection. But yeah that makes total sense. Looks like we were transferring the whole appInfo object via JSBridge which is really huge! Taking only the wanted values is a good solution.
> const Cu = Components.utils;
>+const MZML_DEBUG = false;
Those declarations should be separated.
>+// This is a useful "check" timer. See utils.js, good for debugging
>+if (MZML_DEBUG) {
>+ utils.startTimer();
>+}
I would put it at the end of the file near the other debugging stuff.
> var converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
> .createInstance(Ci.nsIScriptableUnicodeConverter);
> converter.charset = 'utf-8';
>-
> function replacer(key, value) {
[..]
> }
>- }
>+ }
> return value;
Those changes were probably made by accident.
> attachEventListeners(win);
>-
> // For windows or dialogs already open we have to explicitly set the property
Same as above.
Attachment #638929 -
Flags: review?(hskupin) → review-
Reporter | ||
Comment 3•13 years ago
|
||
Pointer to Github pull-request
Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 639191 [details]
Pointer to Github pull request: https://github.com/mozautomation/mozmill/pull/62
Jeff, if you have the time to check that pull it would be great. It contains the fixes as mentioned in the comment before.
Attachment #639191 -
Flags: review?(jhammel)
Comment 5•13 years ago
|
||
Comment on attachment 639191 [details]
Pointer to Github pull request: https://github.com/mozautomation/mozmill/pull/62
looks good.
We should probably formalize the debugging details a bit and pass it over from python if (e.g.) --debug is passed from the command line, but that can be taken as a future RFE
Attachment #639191 -
Flags: review?(jhammel) → review+
Reporter | ||
Comment 6•13 years ago
|
||
Yes, I thought to do it similar like what we have for jsbridge right now. Before that a bit of refactoring should happen, but this will take a bit.
Pushed:
https://github.com/mozautomation/mozmill/commit/e173ad60b0c7d7ab664c5a7c29fb573a4f735e89
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Testing → Testing Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•