Closed Bug 821695 Opened 12 years ago Closed 12 years ago

Do not load videocontrols.xml if the audio/video tag does not need it.

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(blocking-b2g:tef+, blocking-basecamp:-, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g18 fixed, b2g18-v1.0.0 fixed, b2g18-v1.0.1 fixed)

VERIFIED FIXED
B2G C4 (2jan on)
blocking-b2g tef+
blocking-basecamp -
Tracking Status
firefox19 --- wontfix
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- fixed
b2g18-v1.0.1 --- fixed

People

(Reporter: vingtetun, Assigned: roc)

References

Details

(Keywords: perf, Whiteboard: [FFOS_perf])

Attachments

(1 file)

It seems like videcontrols.xml cost 200ms to load on the camera app. It can probably be avoided y not loading it the tag does not request for any controls. See the css rule in https://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/content.css#75
blocking-basecamp: --- → ?
Not a blocker, but looks safe enough to uplift
Assignee: nobody → poirot.alex
blocking-basecamp: ? → -
Comment on attachment 693007 [details] [diff] [review] Bug 821695 - Do not load videocontrols.xml if the audio/video tag does not need it. [Triage Comment] Do check that the video controls still work in B2G webpages. Also check that they work even if .controls=true is set after the video has started playing.
Attachment #693007 - Flags: approval-mozilla-b2g18+
Attachment #693007 - Flags: approval-mozilla-aurora+
Checked audio and video app. html5media.info in browser that uses controls. Tested with this custom page, setting controls=true before/after playing http://test.techno-barje.fr/video/
Comment on attachment 693007 [details] [diff] [review] Bug 821695 - Do not load videocontrols.xml if the audio/video tag does not need it. Everything looks good, but it looks too simple!?
Attachment #693007 - Flags: review?(roc)
I would expect this to break dynamic setting of "controls", or at least trigger assertions in a desktop debug build. Does it not?
You should at least get the warning NS_WARNING("Someone passed native anonymous content directly into frame " "construction. Stop doing that!"); The problem is that setting '-moz-binding' forces reconstruction of the frames for the videocontrols anonymous content, and reconstructing frames for anonymous content is a bad idea. But I think we can probably take this patch anyway, given we need it.
Where are we at with this patch? Roc, do you plan to give r+ or are you waiting for an updated version?
Comment on attachment 693007 [details] [diff] [review] Bug 821695 - Do not load videocontrols.xml if the audio/video tag does not need it. Review of attachment 693007 [details] [diff] [review]: ----------------------------------------------------------------- I'm not sure that uplifting this is still worth the risk. Please renominate if you think it is.
Attachment #693007 - Flags: approval-mozilla-b2g18+
This is a pretty big win for startup performance (~500ms) and makes refreshing the preview a cheaper operation too, see bug 834928 comment 3.
blocking-b2g: --- → tef?
Ok(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #7) > You should at least get the warning > NS_WARNING("Someone passed native anonymous content directly into frame " > "construction. Stop doing that!"); Ok so I applied my patch on a firefox desktop debug build and opened: http://test.techno-barje.fr/video/ Clicked on Play, then Set. Video started playing, controls were working fine. Then I clicked on Unset and Set again, controls disappears and appeared again, still working. Here is the log I have seen while doing this: WARNING: NS_ENSURE_TRUE(resultIndex >= 0) failed: file /mnt/desktop/gecko/toolkit/components/autocomplete/nsAutoCompleteController.cpp, line 1463 ++DOMWINDOW == 11 (0x3317b10) [serial = 14] [outer = 0x3eae520] WARNING: NS_ENSURE_TRUE(currentURI) failed: file /mnt/desktop/gecko/content/base/src/ThirdPartyUtil.cpp, line 96 Finally, I submitted a try run in order to see if tests fail: https://tbpl.mozilla.org/?tree=Try&rev=a6775caaf73e
Whiteboard: [FFOS_perf]
We discussed this during triage today and the thoughts are: - there is an unknown amount of risk associated with this change - the 500 ms startup benefit is great - it doesn't look like we're finished here The decision was to not block on this but please feel free to renom with as much info as you can provide.
blocking-b2g: tef? → -
Assignee: poirot.alex → dale
Keywords: perf
Comment on attachment 693007 [details] [diff] [review] Bug 821695 - Do not load videocontrols.xml if the audio/video tag does not need it. Review of attachment 693007 [details] [diff] [review]: ----------------------------------------------------------------- Okay, based on that testing I think we can take this.
Attachment #693007 - Flags: review?(roc) → review+
Awesome, thanks roc, in my testing this makes a huge improvement to any app thats using videos without controls
blocking-b2g: - → tef?
Keywords: checkin-needed
This caused mochitest-2 orange. Backed out. https://hg.mozilla.org/integration/mozilla-inbound/rev/8b25322ec2bf https://tbpl.mozilla.org/php/getParsedLog.php?id=19355966&tree=Mozilla-Inbound 5021 ERROR TEST-UNEXPECTED-PASS | /tests/dom/imptests/editing/conformancetest/test_runtest.html | [["removeformat",""]] "[foo<video></video>bar]" compare innerHTML 5023 ERROR TEST-UNEXPECTED-PASS | /tests/dom/imptests/editing/conformancetest/test_runtest.html | [["removeformat",""]] "[foo<video src=abc></video>bar]" compare innerHTML
I can investigate this
blocking-b2g: tef? → tef+
(In reply to Dale Harvey (:daleharvey) from comment #18) > I can investigate this Do you still have time for this, Dale?
Flags: needinfo?(dale)
yup working on it right now
Flags: needinfo?(dale)
Actually not so much, I can reproduce the error, same tests fail when I run locally, however its inside layout which is gonna need someone more experienced in that part of the codebase. deassinging
Assignee: dale → nobody
Jet, somebody from the layout could take a look?
Assignee: nobody → bugs
Assignee: bugs → roc
These are only UNEXPECTED PASSes. Probably we just need to mark them as passing.
Those two tests currently fail due to bug 839378 (which I just filed): the videocontrols XBL modify the page DOM (which is bad) causing the test to fail. With this patch, those tests pass, because the controls XBL is not loaded.
Rerunning mochitests with expected-failures (hopefully) changed to passes: https://tbpl.mozilla.org/?tree=Try&rev=417b4117dc3a
Try looks good. Let's land this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Does not make sense to create a regression issue.
Flags: in-moztrap-
Can you please provide steps to verify this fix - as we will blackbox test from the UI?
This change has no visible effect on the UI.
Verified fixed per comment 32.
Status: RESOLVED → VERIFIED
Depends on: 659285
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: