Closed Bug 386378 Opened 17 years ago Closed 6 years ago

call sizeTo() on our result arrays before calling AppendObject()

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal
Points:
2

Tracking

()

RESOLVED INACTIVE

People

(Reporter: moco, Unassigned)

Details

(Keywords: perf)

call sizeTo() on our result arrays before calling AppendObject(), if we can determine the number of results (or even approx number) ahead of time (which we can do with a fast query in some cases for.)

This can help us avoid lots of incremental grows / reallocs.

think about the cases with 10,000 history visits.

some examples:

http://lxr.mozilla.org/seamonkey/source/toolkit/components/autocomplete/src/nsAutoCompleteController.cpp#158

http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/src/xpcjsruntime.cpp#1039

before we make this change, proving it would be a perf win would be necessary.
could do this anytime there are min/max results specified in queries. might be more generically applicable in the post-query filtering bits.
Keywords: perf
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
Whiteboard: [feature] p=0
No longer blocks: fxdesktopbacklog
Flags: firefox-backlog+
Whiteboard: [feature] p=0 → p=0
Whiteboard: p=0 → p=2
Points: --- → 2
Flags: qe-verify?
Whiteboard: p=2
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.