Open
Bug 1113069
Opened 10 years ago
Updated 2 years ago
consider making the array members in nsFont refcounted, to make copying cheaper
Categories
(Core :: Layout: Text and Fonts, defect)
Core
Layout: Text and Fonts
Tracking
()
NEW
People
(Reporter: jfkthame, Unassigned)
References
Details
Attachments
(1 file)
7.56 KB,
text/plain
|
Details |
See bug 1111879 comment 1. In particular, the fix landed in bug 1111879 will not help when font inflation is in effect (common on mobile), where we'll still be hitting the nsFont copy-constructor pretty hard. Making copying/copy-constructing cheaper by avoiding the need to deep-copy the arrays could bring a benefit here.
The other thing that might help, if this doesn't, is:
* switching from nsFont to separate FontFamilyList and gfxFontStyle
* pulling the size out of gfxFontStyle, so we now have 3 separate things
Comment 2•10 years ago
|
||
(In reply to David Baron [:dbaron] (UTC-8) (needinfo? for questions) from comment #1)
> * pulling the size out of gfxFontStyle, so we now have 3 separate things
That's a big change, lots of stuff in the font code keys off the size within gfxFontStyle.
Updated•10 years ago
|
Depends on: cumulative-heap-profiling
Comment 3•10 years ago
|
||
I have more evidence that this will be worthwhile. Viewing a complex PDF map in pdf.js I saw over 1 million heap allocations via FontFamilyList(). I've attached the DMD output.
Some of the cases look like they could be avoided in a piecemeal fashion, like in bug 1113069, but given that |nsFont|s appear to get copied around quite a lot, a more general solution would be good.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•