Closed Bug 850839 Opened 12 years ago Closed 7 years ago

[email] Perf: Try and avoid second reflow in display of HTML messages

Categories

(Firefox OS Graveyard :: Gaia::E-Mail, defect, P3)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: asuth, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [c= p= u= s=])

Etienne provided a good HTML newsletter that does not trigger newsletter mode for us in bug 849924. I ran a profile in https://bugzilla.mozilla.org/show_bug.cgi?id=849924#c9 and found the time spent divided up like so: - buildBodyDom: 169 ticks - initial layout: 64 ticks - resizeFrame triggered re-layout: 41 ticks - linkifyHTML: 55 ticks While the initial layout is sadly long, it seems plausible that we could eliminate that second layout by doing one of the following: - noticing in the sanitization pass whether or not we have a newsletter so we can avoid doing the "let's see how wide the content wants to be" pass every time we display something HTML - maybe seeing if the size the content wanted to be is already the size we are displaying it at It might also be worth considering if we can insert parts of the DOM hierarchy in a chunked fashion so that our synchronous reflows can be a little incremental. Of course, once Gecko iframes support 'srcdoc', reflows won't be synchronous for us... Because Gecko still does not support seamless iframes, we still do need to poke at the styling information somewhat, but touching height should not have anywhere near the reflow impact that touching width has.
See Also: → 849924
Keywords: perf
Whiteboard: [c= p= u= s=]
Is this specific issue still valid and would it be covered under bug 862870? Thanks!
Flags: needinfo?(bugmail)
Priority: -- → P3
The concern is still valid. The slice batching is bug 862870 affects the message_list card. This bug is about our use of HTML iframes to display text/html messages on the message_reader card. Specifically, the mechanism we use to detect e-mail messages that want to be wider than the device can display and so require us to zoom out and enable pan-n-zoom. The game has somewhat changed, however, in that Gecko implemented srcdoc in version 25. Also, our HTML sanitizer could be used to try and detect the newsletter scenario statically/estimate a minimum width, etc. Together these two could do a lot for us. Investigation is still required, though.
Flags: needinfo?(bugmail)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.