Closed
Bug 482853
Opened 16 years ago
Closed 8 years ago
Garbage collection correlates with pauses in execution
Categories
(Core :: JavaScript: GC, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jboston, Unassigned)
References
()
Details
Attachments
(1 file)
3.34 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7
Small pauses in execution caused by garbage collection are visible in applications that try to render smooth animations on a canvas. (I've tried putting some printf statements into Mozilla's garbage collection code to verify this and I'm certain that gc is the cause of the pause.) Our app updates every 25ms using setInterval, but there are semi-frequent pauses where intervals are 250ms or longer.
We'd like to minimize the creation of garbage by re-using arrays of doubles, but from what I understand, changing the value of a double causes the allocation of new memory.
It would be helpful if the engine could minimize the creation of garbage when using doubles.
Reproducible: Always
Steps to Reproduce:
1. In about:config set browser.dom.window.dump.enabled = true
2. Restart browser from command line
3. If you don't have the canvas3d extension installed select "Use dummy canvas context"
4. Select "Dump to console"
5. Run the benchmark with a time of 60 seconds or greater.
Actual Results:
One frame will sometimes take much longer than the rest to render:
30 31 32 39 30 36 32 35 396 20
29 37 33 34 24 25 27 29 30 32
26
---> FPS: 21
Visit c3dl.org for more information on how we are creating a 3D javascript library for canvas3d.
Reporter | ||
Comment 1•16 years ago
|
||
If it's not obvious the URL for the benchmark:
http://www.c3dl.org/test-case/benchmark.html
Reporter | ||
Comment 2•16 years ago
|
||
I'd suggest creating a html page with just a button that when pushed runs the relevant test (without canvas3d), and displays the results in the page... or even better yet, something that can run in the standalone shell.
Reporter | ||
Comment 4•16 years ago
|
||
I've nicked the code from bug 482204's test and modified it slightly to try to simulate the pushing and pulling from the matrix stack that occurs in the c3dl library. I've also changed it so that the array that contains the matrix is scoped in a way that it could be re-used if that were possible. Hopefully this simulates the action of the c3dl. Regardless, it does capture gc pauses.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Comment 6•8 years ago
|
||
We have enough other bugs on file for this sort of thing.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•