Investigate speeding up test_resize_move_windows.html

RESOLVED FIXED in mozilla8

Status

()

Core
DOM
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jgriffin, Assigned: mounir)

Tracking

(Blocks: 1 bug)

Trunk
mozilla8
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
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
(Reporter)

Comment 1

6 years ago
Mounir, as the original test author, would you be willing to help investigate whether this test can be sped up?
(Assignee)

Comment 2

6 years ago
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
Status: NEW → ASSIGNED
(Assignee)

Comment 3

6 years ago
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.
Attachment #547766 - Flags: review?(jst)
(Assignee)

Updated

6 years ago
Whiteboard: [needs review]
(Assignee)

Updated

6 years ago
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+
(Assignee)

Updated

6 years ago
Flags: in-testsuite+
Whiteboard: [needs review] → [inbound]
http://hg.mozilla.org/mozilla-central/rev/da90e2e9a56e
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.