Closed Bug 672400 Opened 13 years ago Closed 7 years ago

OpenGL performance issue when using Firefox 4+

Categories

(Core Graveyard :: Plug-ins, defect)

2.0 Branch
x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: bugs, Unassigned)

References

Details

There is a Flash Player screen update performance issue when using Firefox 4 when compared to Safari on Mac.  We believe this is because of some performance issue with using NPAPI.  This affects Flash Player GPU features (both StageVideo and MoleHill,) but only on specific cards it seems.

Performance Numbers:
Safari/Chrome = 30fps
FF4 = ~15 fps

Repros with an NVIDIA 7300 GT, does NOT repro with an ATI HD 5770

shark of FF 5.0 reveals 10% CPU spent in kernel routine calling nv:WaitForTimeStamp() and another 28% in the firefox app on nv:WaitForNotifier().  

Safari does not have these outlying hot spots.  

I'll update the bug with some test media after I find some outside the Adobe intranet but I'm logging this now in case there's already a dupe re: these video cards on the Mac on Firefox's own GPU/OpenGL features.
Any ideas Benoit?
Steps to repro are listed at bug 674328
I believe there is room from improvement by tweaking how the Core Animation layers are drawn.

Before discussing that it would be worth while investigating with the current nightly version of Firefox since we landed changes to allow painting without blocking the content process (async drawing from the point of view of the content process). It has been reported that it fixed FPS performance problems in FF 4/5.

http://nightly.mozilla.org/
thanks.  I'll pull nightly and see how things are.
Component: General → Plug-ins
Product: Firefox → Core
QA Contact: general → plugins
Version: 4.0 Branch → 2.0 Branch
note problem still exists in FF8.
Here is a game made by Disney that reproduces the issue:
http://www.disneylatino.com/disneyxd/juegos/la_carrera_del_siglo/

Occurs in Firefox 8 as well.
There some optimization we can make to core animation but as I understand it Flash is using CAOpenGLLayer for a GLContext. It appears most plug-ins just want a quick way to draw in 2D/3D an don't really want any features from Core Animation. We can try to improve Core Animation further but we will still be paying a cost of having an extra layer of indirection we will never use.

Instead I think the best route to optimize this would be to let Flash create their own GLContext backed by an IOSurface, something that is simple to do, and use the new suggested drawing model:
https://wiki.mozilla.org/NPAPI:AsyncDrawing

I will try to get in contact with Adobe to see if they are interested.
Resolving old bugs which are likely not relevant any more, since NPAPI plugins are deprecated.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INCOMPLETE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.