Closed
Bug 311571
Opened 19 years ago
Closed 13 years ago
Optimize canvas
Categories
(Core :: Graphics: Canvas2D, defect, P3)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: bzbarsky, Unassigned)
References
Details
(Keywords: perf)
Attachments
(2 files)
This is a tracking bug for various canvas performance stuff. At the moment,
I've been profiling http://www.hixie.ch/tests/adhoc/perf/video/002.html and will
attach those profiles.
![]() |
Reporter | |
Updated•19 years ago
|
![]() |
Reporter | |
Comment 1•19 years ago
|
||
Note the amount of time spent under nsIFrame::Invalidate here...
![]() |
Reporter | |
Comment 2•19 years ago
|
||
Note that we spend about 25-30% of total time in malloc and free... Would be
nice not to do that. ;)
Comment 3•19 years ago
|
||
Maybe we can use nsRecycleAllocator for this ?
![]() |
Reporter | |
Comment 4•19 years ago
|
||
For which? The memory thrashing is in Cairo, not in Mozilla code.
Comment 5•19 years ago
|
||
(In reply to comment #4)
> For which? The memory thrashing is in Cairo, not in Mozilla code.
I was talking about a similar optimization, not necesarily calling the
Mozilla-code directly. I see that a lot of malloc/frees are done, but no cacheis
used. A pool would only work if you're allocating blocks of the same size over
and over again. Some parts could also be allocated on the stack
(pixman_region_create/pixman_region_destroy seems to be a good candidate for
instance). But that's after a 10 minute walk through the profile data and code.
![]() |
Reporter | |
Comment 6•19 years ago
|
||
Right, but that would be something to talk about in a bug we file on cairo
(which someone should do, for that matter).
Depends on: 333177
Updated•17 years ago
|
Priority: -- → P3
![]() |
Reporter | |
Comment 7•17 years ago
|
||
On current trunk, _moz_cairo_fill is about 8% of total time.
We still spend a lot of time on frame invalidation, but there is a whole lot less memory thrashing. total time in malloc/free is down to 4% or so.
Comment 8•17 years ago
|
||
I've done the same comparison as I wrote in Bug 297959 Comment 18. The results for this testcase is:
Fx3:
Elapsed wall-clock time: 3554ms
Elapsed non-idle time: 2914ms
Speed: 4.22fps
Opera:
Elapsed wall-clock time: 1984ms
Elapsed non-idle time: 1344ms
Speed: 7.56fps
Considerations I made in Bug 297959 Comment 18 are still valid here.
![]() |
Reporter | |
Comment 9•17 years ago
|
||
The correct comparison is to ideal fps, not to other browsers.
Comment 10•13 years ago
|
||
This is a metabug that hasn't seen any use in the past 3 years; I think its time has passed.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•