Closed Bug 426806 Opened 17 years ago Closed 16 years ago

Bookmarks "Sort by Name" is extremely slow with Places

Categories

(Firefox :: Bookmarks & History, defect, P2)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED
Firefox 3.1a1

People

(Reporter: mamacdon, Assigned: asaf)

References

Details

(Keywords: perf)

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5 Performance of the "Sort by Name" operation is poor compared to Firefox 2. Reproducible: Always Steps to Reproduce: 1. Add 20-30 bookmarks to the "Bookmarks Menu" folder. 2. Open the Library (Bookmarks > Organize Bookmarks). 3. In the left-hand pane, right-click the Bookmarks Menu folder and choose "Sort by Name". Actual Results: The sorting operation takes a long time to finish. During this time the UI is unresponsive to user input. Expected Results: Sorting should be almost instantaneous, ala Firefox 2.
Keywords: perf
No duplicates found. Confirmed on Fx latest trunk, WinXP.
Blocks: 380307
Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: unspecified → Trunk
what are the times for Fx2 vs Fx3 for the same amount of bookmarks?
Attached file 50 bookmarks for testing (deleted) —
(In reply to comment #2) > what are the times for Fx2 vs Fx3 for the same amount of bookmarks? > In Fx2 reordering is done almost immediately with this testcase (50 bookmars in Mozilla Firefox folder). Fx3 takes about 10 seconds. Related bugs: bug 329534, bug 391836, bug 393497, bug 397993. As Ria Klassen wrote in Bug 397993 Comment #0, probably also this bug is a regression caused by bug 386711. Can someone find a regression range for this and for the other bugs I quoted above?
Priority: -- → P2
Target Milestone: --- → Firefox 3.1
Attached patch batch (obsolete) (deleted) — Splinter Review
Assignee: nobody → mano
Status: NEW → ASSIGNED
Attachment #330630 - Flags: review?(dietrich)
Comment on attachment 330630 [details] [diff] [review] batch >diff --git a/browser/components/places/src/nsPlacesTransactionsService.js b/browser/components/places/src/nsPlacesTransactionsService.js >--- a/browser/components/places/src/nsPlacesTransactionsService.js >+++ b/browser/components/places/src/nsPlacesTransactionsService.js >@@ -893,23 +893,34 @@ > preSep.push(item); > } > if (preSep.length > 0) { > preSep.sort(sortingMethod); > newOrder = newOrder.concat(preSep); > } > > // set the nex indexs can you fix this comment while you're there? >- for (var i = 0; i < count; ++i) >- PlacesUtils.bookmarks.setItemIndex(newOrder[i].itemId, i); >+ var callback = { >+ runBatched: function() { >+ for (var i = 0; i < newOrder.length; ++i) { >+ PlacesUtils.bookmarks.setItemIndex(newOrder[i].itemId, i); >+ } >+ } >+ }; >+ PlacesUtils.bookmarks.runInBatchMode(callback, newOrder); > }, > > undoTransaction: function PSSFBN_undoTransaction() { >- for (item in this._oldOrder) >- PlacesUtils.bookmarks.setItemIndex(item, this._oldOrder[item]); >+ var callback = { >+ runBatched: function() { >+ for (item in oldOrder) >+ PlacesUtils.bookmarks.setItemIndex(item, oldOrder[item]); >+ } >+ }; >+ PlacesUtils.bookmarks.runInBatchMode(callback, this._oldOrder); > } > }; > for both runBatched() callbacks, you didn't define the input parameter. r=me with that fixed.
Attachment #330630 - Flags: review?(dietrich) → review+
changeset 040813674892.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Attachment #330630 - Flags: approval1.9.0.2?
Target Milestone: Firefox 3.1 → Firefox 3.1a1
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch fixed version (deleted) — Splinter Review
Attachment #330630 - Attachment is obsolete: true
Attachment #330630 - Flags: approval1.9.0.2?
Changeset 16160:9122e6bcf822.
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: