hyphenation manager should discard loaded dictionaries on memory-pressure notification

RESOLVED FIXED in mozilla22

Status

()

Core
Internationalization
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

unspecified
mozilla22
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [MemShrink])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
We load the hyphenation resources on first use, but then we keep them in memory so that we won't kill performance by having to do the (expensive) dictionary-loading operation for every line-break.

However, if we're really low on memory, we should discard the dictionaries (which may potentially occupy quite a few megabytes, if hyphenation has been attempted for several languages with large dictionaries).
(Assignee)

Comment 1

5 years ago
Created attachment 719915 [details] [diff] [review]
add a memory-pressure notification observer to the hyphenation manager, to discard dictionaries when we're low on memory.
Attachment #719915 - Flags: review?(smontagu)
(Assignee)

Updated

5 years ago
Assignee: nobody → jfkthame
Attachment #719915 - Flags: review?(smontagu) → review+
(Assignee)

Comment 2

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