If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Erase functions in nsNavHistoryExpire can generate queries with duplicated items

RESOLVED FIXED in Firefox 3 beta3

Status

()

Firefox
Bookmarks & History
RESOLVED FIXED
10 years ago
8 years ago

People

(Reporter: mak, Assigned: mak)

Tracking

({perf})

Trunk
Firefox 3 beta3
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
this was found by Ondrej Brablc while investigating on Bug 409723, here https://bugzilla.mozilla.org/show_bug.cgi?id=409723#c1

nsNavHistoryExpire::EraseHistory
nsNavHistoryExpire::EraseFavicons
nsNavHistoryExpire::EraseAnnotations

are generating strings of IDs to delete starting from visit records, since most of place ids and favicon ids could be the same, these functions are generating large lists with many duplicates, and large queries will end up slowing down sqlite

we must avoid adding duplicated items to delete lists
i'm also removing useless spaces, to shrink queries a little

patch coming
(Assignee)

Updated

10 years ago
Keywords: perf
(Assignee)

Comment 1

10 years ago
Created attachment 297159 [details] [diff] [review]
do not add duplicated ids to queries, and remove useless spacing
Attachment #297159 - Flags: review?(dietrich)
Comment on attachment 297159 [details] [diff] [review]
do not add duplicated ids to queries, and remove useless spacing

Looks good, thanks Marco.

Drivers: Low-impact performance improvement.
Attachment #297159 - Flags: review?(dietrich)
Attachment #297159 - Flags: review+
Attachment #297159 - Flags: approval1.9?

Updated

10 years ago
Attachment #297159 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in toolkit/components/places/src/nsNavHistoryExpire.cpp;
/cvsroot/mozilla/toolkit/components/places/src/nsNavHistoryExpire.cpp,v  <--  nsNavHistoryExpire.cpp
new revision: 1.34; previous revision: 1.33
done
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Keywords: checkin-needed
Target Milestone: --- → Firefox 3 M11
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.