Closed Bug 556026 Opened 11 years ago Closed 3 years ago

OOPP: Vimeo videos hang/skip frames on a single-core CPU

Categories

(Core :: Plug-ins, defect)

x86
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: benjamin, Unassigned)

References

Details

(Whiteboard: [Fx3.6.3plugin2][platform-rel-Vimeo])

Marcia saw, and I reproduced, skipped frames and skippy audio on vimeo. This appears to only be a problem on single-core machines/VMs. I can't reproduce at all on multi-core.

e.g. http://vimeo.com/9369965
Oh, Win7.
OS: Mac OS X → Windows 7
mozilla-runtime is at 50-80% CPU, firefox is at 0%.
wmode="opaque"
Whiteboard: [Fx3.6.3plugin1]
Whiteboard: [Fx3.6.3plugin1] → [Fx3.6.3plugin2]
Running on a multi-core machine, firefox.exe is at 30% of one CPU and mozilla-runtime is at 50-90% of one CPU.

Running on a single-core VM with the low-def version of the video: firefox.exe is at 60-75% of the CPU and mozilla-runtime is at 20-30%. Something is fishy here, what is the parent process actually doing with the CPU?
Codeanalyst says:
fbCompositeSolidMask_nx8x8888sse2 24.84%
fbCompositeSrcAdd_8888x8x8sse2 14.11%
pixman_fill_mmx 12.42%

Everything else is 1% or lower. This is not a hierarchical profile, and was taken inside a VM. I'm working on rebooting a host machine to single-core and trying to reproduce there and get a better profile.
It seems likely that we are doing more than we need to here. Can you get a call stack for one of the fbCompositeSrcAdd_8888x8x8sse2 calls?
>	fbCompositeSolidMask_nx8x8888sse2(op=, pSrc=, pMask=, pDst=, xSrc=, ySrc=, xMask=, yMask=, xDst=, yDst=, width=, height=) Line 3070	C
 	pixman_walk_composite_region(op=PIXMAN_OP_OVER, pSrc=0x04849530, pMask=0x042b8950, pDst=0x0424e9d0, xSrc=0x005a, ySrc=0x0000, xMask=0x005a, yMask=0x0000, xDst=0x0000, yDst=0x0000, width=0x0162, height=0x000d, srcRepeat=0x00000000, maskRepeat=0x00000000, compositeRect=0x6cade5c0) Line 1383	C
 	_moz_pixman_image_composite(op=PIXMAN_OP_OVER, pSrc=0x00000000, pMask=0x042b8950, pDst=0x0424e9d0, xSrc=0x005a, ySrc=0x0000, xMask=0x005a, yMask=0x0000, xDst=0x0000, yDst=0x0000, width=0x0162, height=0x000d) Line 2111	C
 	_cairo_image_surface_composite(op=CAIRO_OPERATOR_OVER, src_pattern=0x0031e6ec, mask_pattern=0x0031e424, abstract_dst=0x00878bf0, src_x=0x0000005a, src_y=0x00000000, mask_x=0x0000005a, mask_y=0x00000000, dst_x=0x00000000, dst_y=0x00000000, width=0x00000162, height=0x0000000d) Line 1014	C
 	_cairo_surface_composite(op=CAIRO_OPERATOR_OVER, src=0x0031e6ec, mask=0x0031e424, dst=0x00878c00, src_x=0x0000005a, src_y=0x00000000, mask_x=0x0000005a, mask_y=0x00000000, dst_x=0x00000000, dst_y=0x00000000, width=0x00000162, height=0x0000000d) Line 1595	C
 	_cairo_surface_fallback_composite(op=CAIRO_OPERATOR_OVER, src=0x0031e6ec, mask=0x0031e424, dst=0x041b8e80, src_x=0x0000005a, src_y=0x00000000, mask_x=0x0000005a, mask_y=0x00000000, dst_x=0x0000005a, dst_y=0x00000000, width=0x00000162, height=0x0000000d) Line 1198	C
 	_cairo_surface_composite(op=CAIRO_OPERATOR_OVER, src=0x0031e6ec, mask=0x0031e424, dst=0x041b8e90, src_x=0x0000005a, src_y=0x00000000, mask_x=0x0000005a, mask_y=0x00000000, dst_x=0x0000005a, dst_y=0x00000000, width=0x00000162, height=0x0000000d) Line 1606	C
 	_composite_trap_region(clip=0x0501d650, src=0x0031e6ec, op=CAIRO_OPERATOR_OVER, dst=0x00000000, trap_region=0x0422f2c0, extents=0x00000000) Line 457	C
 	_clip_and_composite_trapezoids(src=0x0031e6ec, op=CAIRO_OPERATOR_OVER, dst=0x041b8e80, traps=0x0031e5e0, clip=0x0501d650, antialias=CAIRO_ANTIALIAS_DEFAULT) Line 641	C
 	_cairo_surface_fallback_fill(surface=0x041b8e80, op=CAIRO_OPERATOR_OVER, source=0x0031e6ec, path=0x0260aae4, fill_rule=CAIRO_FILL_RULE_WINDING, tolerance=0.10000000000000001, antialias=CAIRO_ANTIALIAS_DEFAULT) Line 990	C
 	_cairo_surface_fill(surface=0x041b8e80, op=CAIRO_OPERATOR_OVER, source=0x0031e6ec, path=0x0260aae4, fill_rule=CAIRO_FILL_RULE_WINDING, tolerance=0.10000000000000001, antialias=CAIRO_ANTIALIAS_DEFAULT, extents=0x00000000) Line 2004	C
 	_cairo_gstate_fill(gstate=0x0501d5c0, path=0x0260aae4) Line 1078	C
 	_moz_cairo_fill_preserve(cr=0x0260a800) Line 2203	C
 	nsCSSRendering::PaintBackgroundWithSC(aPresContext=0x05dcac00, aRenderingContext={...}, aForFrame=0x05f4d7f8, aDirtyRect={...}, aBorderArea={...}, aBackground={...}, aBorder={...}, aFlags=0x00000000, aBGClipRect=0x00000000) Line 2173	C++
 	nsDisplayBackground::Paint(aBuilder=0x0031eb70, aCtx=0x02d6a8c0) Line 716	C++
 	nsDisplayList::Paint(aBuilder=0x0031eb70, aCtx=0x02d6a8c0) Line 405	C++
 	nsDisplayClip::Paint(aBuilder=0x0031eb70, aCtx=0x02d6a8c0) Line 1201	C++
 	nsLayoutUtils::PaintFrame(aRenderingContext=0x02d6a8c0, aFrame=0x05d8f3b0, aDirtyRegion={...}, aBackstop=0xffffffff, aFlags=0x00000000) Line 1145	C++
 	PresShell::Paint(aView=0x00887700, aRenderingContext=0x02d6a8c0, aDirtyRegion={...}) Line 5842	C++
 	nsViewManager::RenderViews(aView=0x00000000, aRC={...}, aRegion={...}) Line 534	C++
 	nsViewManager::Refresh(aView=0x00000000, aContext=0x02d77920, aRegion=0x02d6a8c0, aUpdateFlags=0x6c87cc10) Line 494	C++
 	nsViewManager::DispatchEvent(aEvent=, aView=, aStatus=) Line 1008	C++
 	HandleEvent(aEvent=0x00000001) Line 168	C++
 	nsWindow::DispatchEvent(event=0x0031f078, aStatus=nsEventStatus_eIgnore) Line 2979	C++
 	nsWindow::DispatchWindowEvent(event=0x0031f078, aStatus=nsEventStatus_eIgnore) Line 3013	C++
 	nsWindow::OnPaint(aDC=0x00000000) Line 563	C++
 	nsWindow::ProcessMessage(msg=0x0000000f, wParam=0x00000000, lParam=0x00000000, aRetValue=0x0031f2a0) Line 4016	C++
 	nsWindow::WindowProc(hWnd=0x00000001, msg=0x0000000f, wParam=0x00000000, lParam=0x00000000) Line 3715	C++
 	_InternalCallWinProc@20()	
 	_UserCallWinProcCheckWow@32()	
 	_DispatchClientMessage@20()	
 	___fnDWORD@4()	
 	_KiUserCallbackDispatcher@12()	
 	_NtUserCallHwndLock@8()	
 	_UpdateWindow@4()	
 	nsWindow::DispatchStarvedPaints(aWnd=0x0004020e, aMsg=0x00000000) Line 3119	C++

I tried the same thing on a real (non-VM) machine running with one CPU. It did not display the same symptoms at all.

I have this in recording if that can help provide data.
Jeff's going to be a hero.
Assignee: nobody → jmuizelaar
FWIW, I try this with mozilla-central and I don't see nearly as much CPU usage in mozilla-central. This appears to be lorentz-specific.
I don't get any calls to _moz_pixman_image_composite when playing the vimeo video in the background in a xp vm.
I'm not sure that codeanalyst is giving me correct data in the VM... it's certainly not giving useful hierarchical profiles. Taking this off the blocker list for now, but we'll watch for reports of performance issues on windowless flash sites.
Assignee: jmuizelaar → nobody
No longer blocks: LorentzBeta1
Is this related to issues with youtube video playback as well? 

That is, the video page (with comments, related, etc...) works well, but that same video embedded anywhere else (ex: a youtube user page) uses a lot more CPU (~3.5 times more).

In both cases, firefox.exe uses an immense amount of CPU. (Single Core with HT here)
platform-rel: --- → ?
Whiteboard: [Fx3.6.3plugin2] → [Fx3.6.3plugin2][platform-rel-Vimeo]
platform-rel: ? → ---
Resolving old bugs which are likely not relevant any more, since NPAPI plugins are deprecated.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.