Closed
Bug 394695
Opened 17 years ago
Closed 17 years ago
Places rebuilds lots of stuff on every command update
Categories
(Firefox :: Bookmarks & History, defect, P2)
Tracking
()
RESOLVED
FIXED
Firefox 3 beta1
People
(Reporter: bzbarsky, Assigned: asaf)
References
Details
(Keywords: perf)
Attachments
(1 file)
23.59 KB,
patch
|
dietrich
:
review+
mconnor
:
approval1.9+
|
Details | Diff | Splinter Review |
See comments in bug 352394. It would be nice to not rebuild places UI stuff just because a command for a textfield on the page somewhere got updated.
Flags: blocking-firefox3?
Updated•17 years ago
|
Priority: -- → P2
Target Milestone: --- → Firefox 3 M9
Assignee | ||
Comment 1•17 years ago
|
||
Attachment #281345 -
Flags: review?(dietrich)
Assignee | ||
Updated•17 years ago
|
Assignee: nobody → mano
Comment 2•17 years ago
|
||
Comment on attachment 281345 [details] [diff] [review]
cache insertionpoints, flavors and controllers
r=me, a couple of nits below
>
> var orientation = NHRVO.DROP_AFTER;
> // If there is no selection, insert at the end of the container.
> if (!this.hasSelection) {
> var index = this.view.rowCount - 1;
>- return this._getInsertionPoint(index, orientation);
>+ return this._cachedInsertionPoint = this._getInsertionPoint(index, orientation);
nit: line length
>@@ -479,17 +485,17 @@
> // If the sole selection is the bookmarks toolbar folder, we insert
> // into it even if it is not opened
> if (this.hasSingleSelection && resultView.isContainer(max.value) &&
> (resultView.isContainerOpen(max.value) ||
> resultView.nodeForTreeIndex(max.value)
> .itemId == PlacesUtils.bookmarksRootId))
> orientation = NHRVO.DROP_ON;
>
>- return this._getInsertionPoint(max.value, orientation);
>+ return this._cachedInsertionPoint = this._getInsertionPoint(max.value, orientation);
ditto
>@@ -987,21 +993,25 @@
>
> <method name="destroyContextMenu">
> <parameter name="aPopup"/>
> <body/>
> </method>
> </implementation>
> <handlers>
> <handler event="focus"><![CDATA[
>+ this._cachedInsertionPoint = undefined;
>+
> // See select handler. We need the sidebar's places commandset to be
> // updated as well
> document.commandDispatcher.updateCommands("focus");
> ]]></handler>
> <handler event="select"><![CDATA[
>+ this._cachedInsertionPoint = undefined;
>+
nit: whitespace
Attachment #281345 -
Flags: review?(dietrich) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #281345 -
Flags: approval1.9?
Assignee | ||
Comment 3•17 years ago
|
||
Boris: I kinda don't understand the initial bug though, we update our commands on-event, not on-commmand. Places-specific commands are updated on focus-change and on explicit tree-selection (in a places-tree, that is). That said, Edit & Clipboard commands are also supported by PlacesController and are updated on-selection-change (in addition to on-focus).
Reporter | ||
Comment 4•17 years ago
|
||
> we update our commands on-event, not on-commmand
I was seeing places code update its stuff every time selection changed in any text input in the page when I filed this bug. These changes were consuming a lot of tiem. Perhaps that's no longer the case. I'd have to do some retesting to see, and I'm not really sure it's worth it.
Assignee | ||
Comment 5•17 years ago
|
||
Oh, figures, the old places-commandupdater used to track "select" events. Do you mind if I morph this bug to cover other optimizations?
Reporter | ||
Comment 6•17 years ago
|
||
Go for it.
Updated•17 years ago
|
Attachment #281345 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 7•17 years ago
|
||
mozilla/browser/components/places/content/controller.js 1.180
mozilla/browser/components/places/content/menu.xml 1.84
mozilla/browser/components/places/content/toolbar.xml 1.103
mozilla/browser/components/places/content/tree.xml 1.82
mozilla/browser/components/places/content/utils.js 1.65
Updated•17 years ago
|
Flags: blocking-firefox3? → blocking-firefox3+
Comment 8•17 years ago
|
||
Mano, is this fixed?
Assignee | ||
Comment 9•17 years ago
|
||
very likely ;)
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 10•15 years ago
|
||
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".
In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body contains places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.
Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.
Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•