Closed Bug 311571 Opened 19 years ago Closed 13 years ago

Optimize canvas

Categories

(Core :: Graphics: Canvas2D, defect, P3)

x86
Linux
defect

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.
Blocks: 297959
Depends on: 298187
Note the amount of time spent under nsIFrame::Invalidate here...
Note that we spend about 25-30% of total time in malloc and free... Would be nice not to do that. ;)
Keywords: perf
Maybe we can use nsRecycleAllocator for this ?
For which? The memory thrashing is in Cairo, not in Mozilla code.
(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.
Right, but that would be something to talk about in a bug we file on cairo (which someone should do, for that matter).
Priority: -- → P3
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.
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.
The correct comparison is to ideal fps, not to other browsers.
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.

Attachment

General

Created:
Updated:
Size: