Bug 29323 - canvas demo stutters half way through
Summary: canvas demo stutters half way through
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://www.nihilogic.dk/labs/pocket_f...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-16 19:06 PDT by Eric Seidel (no email)
Modified: 2009-09-22 11:05 PDT (History)
1 user (show)

See Also:


Attachments
Shark sample from Safari 4.0.3, in case it's useful. (3.06 MB, application/octet-stream)
2009-09-17 01:02 PDT, Eric Seidel (no email)
no flags Details
possibly useful sample trace? (610.75 KB, application/octet-stream)
2009-09-17 01:06 PDT, Eric Seidel (no email)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2009-09-16 19:06:27 PDT
canvas demo stutters half way through

http://www.nihilogic.dk/labs/pocket_full_of_canvas/demo.php

It also seems to peg Safari, but that may be expected.

CCing oliver as he's had interest in this type of perf bug in the past.
Comment 1 Oliver Hunt 2009-09-16 21:39:01 PDT
I don't see any stuttering -- could you sample it when you see the stutter?
Comment 2 Eric Seidel (no email) 2009-09-17 00:57:03 PDT
The stutter happens for me when the big white blobs come on screen.  Attempting to get a sample now.
Comment 3 Eric Seidel (no email) 2009-09-17 01:01:03 PDT
The big white blobs right after the swirly colored dots (rather early in the demo).

I found resizing the window while the demo was going made it obvious when it started to stutter.

I was testing in a Safari 4.0.3 release build, so symbols are mostly missing.  It seems it was spending most of its time in JSObject::mark() according to Shark heavy view:

	25.7%	25.7%	JavaScriptCore	JSC::JSObject::mark()	
	12.0%	12.0%	JavaScriptCore	JSC::JSArray::mark()	
	9.9%	9.9%	JavaScriptCore	JSC::JSFunction::mark()	
	6.0%	6.0%	JavaScriptCore	JSC::CodeBlock::mark()	
	5.6%	5.6%	JavaScriptCore	unsigned long JSC::Heap::sweep<(JSC::HeapType)0>()	
	3.3%	3.3%	JavaScriptCore	JSC::JSActivation::mark()	
	3.1%	3.1%	JavaScriptCore	JSC::JSStaticScopeObject::mark()	

Still working on getting you a better sample.
Comment 4 Eric Seidel (no email) 2009-09-17 01:02:30 PDT
Created attachment 39683 [details]
Shark sample from Safari 4.0.3, in case it's useful.
Comment 5 Eric Seidel (no email) 2009-09-17 01:06:28 PDT
Created attachment 39684 [details]
possibly useful sample trace?

I can't really tell how to use Sample.app, it seems more complicated than the command line version. :)
Comment 6 Oliver Hunt 2009-09-17 11:15:23 PDT
Can you please test in a nightly?  We've made a number of improvements to JSC since 4.0.3
Comment 7 Oliver Hunt 2009-09-17 11:15:48 PDT
Are you testing in 32bit or 64bit safari?
Comment 8 Eric Seidel (no email) 2009-09-22 10:47:18 PDT
It looks like my Safari only has 2 architectures.  Looks like I'm using 32-bit.  Safari 4.0.3 on 10.5.8.
file /Applications/Safari.app/Contents/MacOS/Safari
/Applications/Safari.app/Contents/MacOS/Safari: Mach-O universal binary with 2 architectures
/Applications/Safari.app/Contents/MacOS/Safari (for architecture ppc7400):	Mach-O executable ppc
/Applications/Safari.app/Contents/MacOS/Safari (for architecture i386):	Mach-O executable i386
Comment 9 Oliver Hunt 2009-09-22 11:01:56 PDT
Eric, can you do me a favour and try with a nightly? (i assume you're on a 32bit only machine, or haven't upgraded to SL :P )
Comment 10 Eric Seidel (no email) 2009-09-22 11:05:54 PDT
Happy to! :)  My SL copy is still in the mail (personal), and work won't have SL for a while yet (due to some Radar's on file). :(