The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla12

Status

()

Core
Layout: Text
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

(Blocks: 1 bug)

unspecified
mozilla12
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [MemShrink])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
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.

Comment 1

5 years ago
I love this idea. Do you plan on having this land together with the cache changes, or after?
(Assignee)

Comment 2

5 years ago
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.
(Assignee)

Comment 3

5 years ago
Created attachment 580010 [details] [diff] [review]
observe memory-pressure notification and discard cached gfxShapedWord records.
(Assignee)

Updated

5 years ago
Attachment #580010 - Flags: review?(roc)
Blocks: 710501
Attachment #580010 - Flags: review?(roc) → review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/f94f83c7f2df
Target Milestone: --- → mozilla12
(Assignee)

Updated

5 years ago
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Backed out of inbound for crashes:
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=f94f83c7f2df

https://hg.mozilla.org/integration/mozilla-inbound/rev/76fc8cdd2a31
Target Milestone: mozilla12 → ---
(Assignee)

Comment 6

5 years ago
Created attachment 588347 [details] [diff] [review]
patch, v2 - observe memory-pressure notification and discard cached gfxShapedWord records

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)
Attachment #588347 - Flags: review?(roc) → review+
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/6290daa65189
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/6290daa65189
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [MemShrink]
You need to log in before you can comment on or make changes to this bug.