Closed
Bug 558962
Opened 15 years ago
Closed 15 years ago
Memoize nsPlaintextEditor::GetDefaultEditorPrefs to avoid unnecessary calls to the pref service
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a5
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
(Keywords: perf)
Attachments
(1 file)
(deleted),
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
Currently, nsPlaintextEditor::GetDefaultEditorPrefs calls into the pref service each time it's called. As it turns out, this call is made at least once if you set the value on an input text control, which is really inefficient. We can listen for changes on that pref, and only update them when necessary.
Attachment #438639 -
Flags: review?(roc)
Comment on attachment 438639 [details] [diff] [review]
Patch (v1)
+static
+int
one line
+ if (sNewlineHandlingPref == -1 && sCaretStylePref == -1) {
Just check one of them
Attachment #438639 -
Flags: review?(roc) → review+
Updated•15 years ago
|
OS: Mac OS X → All
Summary: Memoize nsPlaintextEditor::GetDefaultEditorPrefs to avoid unnecessary calls to the pref service → Memorize nsPlaintextEditor::GetDefaultEditorPrefs to avoid unnecessary calls to the pref service
Assignee | ||
Comment 2•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
Assignee | ||
Comment 3•15 years ago
|
||
The bug title wasn't a typo! :-)
http://en.wikipedia.org/wiki/Memoization
Summary: Memorize nsPlaintextEditor::GetDefaultEditorPrefs to avoid unnecessary calls to the pref service → Memoize nsPlaintextEditor::GetDefaultEditorPrefs to avoid unnecessary calls to the pref service
You need to log in
before you can comment on or make changes to this bug.
Description
•