Closed Bug 708075 Opened 13 years ago Closed 12 years ago

the shaped-word caches should be flushed on memory-pressure notification

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink])

Attachments

(1 file, 1 obsolete file)

The caches for per-font/word shaped glyph data (introduced in bug 703100, replacing gfxTextRunWordCache) should observe the memory-pressure notification and discard cached words when memory is low.

This would have been difficult to do in the old gfxTextRunWordCache world, because of the complex ownership and referencing of the glyph data, but with the per-gfxFont shaped-word caches, it should be simple. This will then allow us to keep shaped-word data in the cache longer for potential re-use, knowing that it will be evicted if necessary.
I love this idea. Do you plan on having this land together with the cache changes, or after?
No reason we shouldn't land it at the same time, I think - I'll post a patch shortly. It's pretty trivial to implement in the new model.
Attachment #580010 - Flags: review?(roc)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Well, that lit up the tree like it's still Christmas.

This patch passes try without complaint :) .... marking for re-review as it's somewhat restructured from the previous version.
Attachment #580010 - Attachment is obsolete: true
Attachment #588347 - Flags: review?(roc)
https://hg.mozilla.org/mozilla-central/rev/6290daa65189
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [MemShrink]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: