Last Comment Bug 673277 - Investigate speeding up test_resize_move_windows.html
: Investigate speeding up test_resize_move_windows.html
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla8
Assigned To: Mounir Lamouri (:mounir)
:
Mentors:
Depends on:
Blocks: 670229
  Show dependency treegraph
 
Reported: 2011-07-21 15:55 PDT by Jonathan Griffin (:jgriffin)
Modified: 2011-08-03 02:20 PDT (History)
3 users (show)
mounir: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (4.57 KB, patch)
2011-07-22 12:18 PDT, Mounir Lamouri (:mounir)
ehsan: review+
Details | Diff | Review

Description Jonathan Griffin (:jgriffin) 2011-07-21 15:55:20 PDT
As part of the BuildFaster project (see https://wiki.mozilla.org/ReleaseEngineering/BuildFaster), we are investigating whether certain slow mochitests can be sped up.

test_resize_move_windows.html is a slow test, average execution time on a recent run (in ms):

	win32-debug, 162744
	linux-opt, 157725
	macosx64-debug, 163881
	win32-opt, 157829
	linux64-debug, 163220
	linux64-opt, 157870
	linux-debug, 162402
	macosx-debug, 164926
Comment 1 Jonathan Griffin (:jgriffin) 2011-07-21 15:56:16 PDT
Mounir, as the original test author, would you be willing to help investigate whether this test can be sped up?
Comment 2 Mounir Lamouri (:mounir) 2011-07-22 11:42:39 PDT
One of the issue with this test is that we test (among other things) some things that should not happen and that is handled by the native window implementation. In other words, we can't just count how many times we went into the event loop and know it should have happen. For the moment, there is a hard-coded constant of 10 times into the event loop. I can lower this to 5 or 4 but it might leads to random-green or weird failures. The former are not a major issue and the later will be visible soon if they should happen.
I can hardly do anything else, this test will remain a bit slow. Actually, I could do all the changes that shouldn't create any change in the window and wait after all of them being called instead of after each change but I would prefer to avoid that...
Comment 3 Mounir Lamouri (:mounir) 2011-07-22 12:18:40 PDT
Created attachment 547766 [details] [diff] [review]
Patch v1

I did actually change my mind and went to this configuration:
- do all changes;
- hit the event loop 5 times to see if something happens.

The result is that, locally, the test was taking 2m45s and is now taking 14s. The only major issue is that if the test someday fails a dev will have to manually check which operation was accepted. It is worth it I think.
Comment 4 :Ehsan Akhgari (out sick) 2011-07-25 14:03:29 PDT
Comment on attachment 547766 [details] [diff] [review]
Patch v1

Sounds like a good tradeoff!
Comment 5 Marco Bonardo [::mak] 2011-08-03 02:20:07 PDT
http://hg.mozilla.org/mozilla-central/rev/da90e2e9a56e

Note You need to log in before you can comment on or make changes to this bug.