Closed Bug 673277 Opened 9 years ago Closed 9 years ago

Investigate speeding up test_resize_move_windows.html


(Core :: DOM: Core & HTML, defect)

Not set





(Reporter: jgriffin, Assigned: mounir)


(Blocks 1 open bug)


(Whiteboard: [inbound])


(1 file)

As part of the BuildFaster project (see, 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
Mounir, as the original test author, would you be willing to help investigate whether this test can be sped up?
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...
Assignee: nobody → mounir
Attached patch Patch v1Splinter Review
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.
Attachment #547766 - Flags: review?(jst)
Whiteboard: [needs review]
Attachment #547766 - Flags: review?(jst) → review?(ehsan)
Comment on attachment 547766 [details] [diff] [review]
Patch v1

Sounds like a good tradeoff!
Attachment #547766 - Flags: review?(ehsan) → review+
Flags: in-testsuite+
Whiteboard: [needs review] → [inbound]
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.