Closed Bug 846459 Opened 10 years ago Closed 10 years ago

Switching to a tab with marketplace.firefox.com takes about one second

Categories

(Marketplace Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fb+mozdev, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130220104816

Steps to reproduce:

0. Have a couple of tabs open. 
1. Open marketplace.firefox.com in a new tab. 
2. Switch to another tab (Mac touchpad tap or click) 
3. Return to the Marketplace tab (Mac touchpad tap or click)


Actual results:

Switching to the Marketplace tab takes about 1 sec (though the title is changed immediately). 


Expected results:

The tab should be switched right away.
May be a dupe of 605143 (however the Marketplace site does not look overly complex to me – or is it the JS?).
Blocks: tabswitch
Depends on: 605143
Hardware: x86 → x86_64
Uh yeah, this is happening on a low-level MBA 2012 with 8GB RAM and only a few programs running, so this should not be a resources or I/O problem.
Can you post a profile of the tab switch?
How? I guess you don't mean zipping the profile folder.
See Also: → 846470
The post indicates that Release (and thus Beta) has a built-in profiler. Do I need to profile with Nightly nonetheless?
Nightly is probably best.
Jeff, here's a link to what I got from the Gecko Profiler addon. I am not sure if I'm using it correctly.  I used Nightly and the latest Profiler build, had a couple of tabs open, clicked "Start" for the Profiler, switched to the marketplace tab, then "Stop" in the profiler and uploaded what I got out of that. 

http://people.mozilla.com/~bgirard/cleopatra/#report=7e302ae3d35bb83401c1d186657ac878f8f8804b
Flags: needinfo?(bugzmuiz)
Flags: needinfo?(jmuizelaar)
So the cause of this is the scaled down category images.

Scaled sprites are not very friendly to Firefox currently. We need to fix Firefox so it so it's not so bad, however the path to doing so is not immediately obvious to me.
Component: Untriaged → Graphics
Flags: needinfo?(jmuizelaar)
Product: Firefox → Core
Thanks Jeff!
Status: UNCONFIRMED → NEW
Ever confirmed: true
I was actually a little bit wrong. It seems like the actual cause is the grain image.
What's happening is we take the 200x200 image tile it on to a 3040x2560 surface and scale that down to the particular category tile.

If you remove the background-size: 10px 10px from mkt/grain.png everything draws much faster.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
(In reply to Jeff Muizelaar [:jrmuizel] from comment #11)
> I was actually a little bit wrong. It seems like the actual cause is the
> grain image.
> What's happening is we take the 200x200 image tile it on to a 3040x2560
> surface and scale that down to the particular category tile.
> 
> If you remove the background-size: 10px 10px from mkt/grain.png everything
> draws much faster.

Yep. The 10px 10px background-size was actually a typo. It was meant to be 100px 100px, half the intrinsic size, to support Retina and other HiDPI displays. This bug was fixed on the web dev side by fixing the typo.
Component: Graphics → General
OS: Mac OS X → All
Product: Core → Marketplace
Hardware: x86_64 → All
Version: 20 Branch → 1.5
Probably Bug 732150 covers the Firefox bug.
See Also: → 732150
You need to log in before you can comment on or make changes to this bug.