Closed Bug 904039 Opened 7 years ago Closed 7 years ago

Huge about:newtab thumbnails slow down the tabopen animation on hi-res displays

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 26
Tracking Status
firefox24 --- fixed
firefox25 --- verified
firefox26 --- verified

People

(Reporter: ttaubert, Assigned: ttaubert)

Details

Attachments

(1 file, 1 obsolete file)

Since I have a quite powerful MBP with a Retina screen I always wondered why opening a new tab with default about:newtab feels so slow and doesn't even allow the tabopen animation to be rendered.

The problem here is that we don't account for the devicePixelRatio when determining the thumbnail size. We end up with 9 thumbnails that are almost as big as the screen (with my DPI settings at least) and that takes a huge amount of time to scale down and paint.
Summary: Huge about:newtab thumbnails slow down the tabopen animation → Huge about:newtab thumbnails slow down the tabopen animation on hi-res displays
Attachment #788906 - Flags: review?(mhammond) → review+
Using nsIScreen.GetRectDisplayPix() is even easier :)
Attachment #788906 - Attachment is obsolete: true
Attachment #788910 - Flags: review?(mhammond)
Attachment #788910 - Flags: review?(mhammond) → review+
Comment on attachment 788910 [details] [diff] [review]
Take devicePixelRatio into account when determining thumbnail size, v2

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Thumbnails for newtab page
User impact if declined: Users with Retina displays will have huge thumbnails and experience a very slow tabopen animation which makes the whole browser feel sluggish.
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): Very low risk one-line patch.
String or IDL/UUID changes made by this patch: None.
Attachment #788910 - Flags: approval-mozilla-beta?
Attachment #788910 - Flags: approval-mozilla-aurora?
Comment on attachment 788910 [details] [diff] [review]
Take devicePixelRatio into account when determining thumbnail size, v2

We should definitely uplift this - I'll let rel-mgmt handle the beta request, but a=me for Aurora.
Attachment #788910 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/mozilla-central/rev/f4308e433d77
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Comment on attachment 788910 [details] [diff] [review]
Take devicePixelRatio into account when determining thumbnail size, v2

It's early enough, let's get this on Beta too - low risk  and time to back out if unforeseen regression occurs.
Attachment #788910 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Keywords: verifyme
Can you or anyone that has a hi-res display please verify this is fixed on Firefox 24, Firefox 25 beta and latest Aurora?
Flags: needinfo?(ttaubert)
Thumbnails on my Retina Mac are about one 9th of the screen, so they have the correct size. Manually verified on Beta and Aurora.
Flags: needinfo?(ttaubert)
Thanks for the help, Tim.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.