Closed
Bug 344059
Opened 18 years ago
Closed 18 years ago
Don't write search prefs. on shutdown unless something has changed
Categories
(Firefox :: Search, defect)
Tracking
()
RESOLVED
FIXED
Firefox 2 beta2
People
(Reporter: ispiked, Assigned: ispiked)
Details
(Keywords: fixed1.8.1, perf)
Attachments
(1 file, 6 obsolete files)
5.27 KB,
patch
|
ispiked
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
As of now, we always write the search engine metadata using mozStroage on shutdown. We should only do this if this metadata changed. See bug 341850 comment 9.
Assignee | ||
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
(from patch) if (this._needToSetOrderPrefs) { engineMetadataService.setAttr(engines[i], "order", i+1); dump("into saveSortedengineList\n"); var engines = this._getSortedEngines(false); // here -----> for (var i = 0; i < engines.length; ++i) engineMetadataService.setAttr(engines[i], "order", i+1); // ----------- } If we expand engineMetadataService.setAttr(engines[i], "order", i+1) we get something like : for .... begin transaction query end transaction and that's the problem in bug 341850 (i.e. use of transactions in a bad way).
Comment 3•18 years ago
|
||
This is meant to be applied in addition to the patch in that bug - it's just moving the current code.
Comment 4•18 years ago
|
||
(In reply to comment #3) > This is meant to be applied in addition to the patch in that bug - it's just > moving the current code. OH ok :) So mv 'comment #2' /dev/null
Updated•18 years ago
|
Flags: blocking-firefox2+
Comment 5•18 years ago
|
||
This patch needs to be updated now that bug 341850 landed.
Assignee | ||
Comment 6•18 years ago
|
||
Attachment #228633 -
Attachment is obsolete: true
Attachment #229337 -
Flags: review?(gavin.sharp)
Attachment #228633 -
Flags: review?(gavin.sharp)
Updated•18 years ago
|
Whiteboard: [has patch][needs review gavin]
Assignee | ||
Comment 7•18 years ago
|
||
Attachment #229337 -
Attachment is obsolete: true
Attachment #230769 -
Flags: review?(gavin.sharp)
Attachment #229337 -
Flags: review?(gavin.sharp)
Comment 8•18 years ago
|
||
Comment on attachment 230769 [details] [diff] [review] patch v3 >Index: browser/components/search/nsSearchService.js >+ // We only need to write the prefs. if something has changed. >+ if (this._needToSetOrderPrefs) { Just return early if (!_needToSetOrderPrefs), and save the indentation. Also, I think you should set _needToSetOrderPrefs in an else block after http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/components/search/nsSearchService.js&rev=1.63#2329 .
Assignee | ||
Comment 9•18 years ago
|
||
Attachment #230769 -
Attachment is obsolete: true
Attachment #230790 -
Flags: review?(gavin.sharp)
Attachment #230769 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 10•18 years ago
|
||
OK. Think I got it this time...
Attachment #230790 -
Attachment is obsolete: true
Attachment #230791 -
Flags: review?(gavin.sharp)
Attachment #230790 -
Flags: review?(gavin.sharp)
Comment 11•18 years ago
|
||
Comment on attachment 230791 [details] [diff] [review] patch v4 (for real) Set _needToSetOrderPrefs to true inside the if() block at: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/components/search/nsSearchService.js&rev=1.64&mark=2220#2220 and r=me. Might also want to add something like "this needs to happen anytime _sortedEngines is modified after initial startup" to the comment near _needToSetOrderPrefs's declaration.
Attachment #230791 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 12•18 years ago
|
||
Attachment #230791 -
Attachment is obsolete: true
Attachment #230805 -
Flags: review+
Assignee | ||
Updated•18 years ago
|
Whiteboard: [has patch][needs review gavin] → [checkin needed]
Assignee | ||
Comment 13•18 years ago
|
||
Attachment #230805 -
Attachment is obsolete: true
Attachment #230810 -
Flags: review+
Comment 14•18 years ago
|
||
mozilla/browser/components/search/nsSearchService.js 1.65
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Target Milestone: --- → Firefox 2 beta2
Updated•18 years ago
|
Whiteboard: [has patch][baking]
Assignee | ||
Comment 15•18 years ago
|
||
Comment on attachment 230810 [details] [diff] [review] patch v4 (really for checkin) This patch has been on trunk since Thursday with no known regressions. It makes writing the order of search engines on shutdown only take place if the order has actually changed.
Attachment #230810 -
Flags: approval1.8.1?
Updated•18 years ago
|
Attachment #230810 -
Flags: approval1.8.1? → approval1.8.1+
Assignee | ||
Updated•18 years ago
|
Whiteboard: [has patch][baking] → [checkin needed (1.8 branch)]
Comment 16•18 years ago
|
||
mozilla/browser/components/search/nsSearchService.js 1.1.2.54
Keywords: fixed1.8.1
Whiteboard: [checkin needed (1.8 branch)]
You need to log in
before you can comment on or make changes to this bug.
Description
•