Last Comment Bug 846690 - hyphenation manager should discard loaded dictionaries on memory-pressure notification
: hyphenation manager should discard loaded dictionaries on memory-pressure not...
Status: RESOLVED FIXED
[MemShrink]
:
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla22
Assigned To: Jonathan Kew (:jfkthame)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-01 02:31 PST by Jonathan Kew (:jfkthame)
Modified: 2013-03-09 02:04 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
add a memory-pressure notification observer to the hyphenation manager, to discard dictionaries when we're low on memory. (4.69 KB, patch)
2013-03-01 04:29 PST, Jonathan Kew (:jfkthame)
smontagu: review+
Details | Diff | Splinter Review

Description Jonathan Kew (:jfkthame) 2013-03-01 02:31:51 PST
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).
Comment 1 Jonathan Kew (:jfkthame) 2013-03-01 04:29:50 PST
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.
Comment 3 Ryan VanderMeulen [:RyanVM] 2013-03-01 15:50:21 PST
https://hg.mozilla.org/mozilla-central/rev/5040d4861a8d

Note You need to log in before you can comment on or make changes to this bug.