Last Comment Bug 412758 - Erase functions in nsNavHistoryExpire iterate all history visits many times
: Erase functions in nsNavHistoryExpire iterate all history visits many times
Status: RESOLVED FIXED
: perf
Product: Firefox
Classification: Client Software
Component: Bookmarks & History (show other bugs)
: Trunk
: All All
: P3 normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on: 409723 423671 520165
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-17 02:44 PST by Ondrej Brablc
Modified: 2011-05-02 08:45 PDT (History)
2 users (show)
mbeltzner: blocking‑firefox3-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Ondrej Brablc 2008-01-17 02:44:49 PST
Bug 412438 fixed duplicate IDs in SQL queries, however, it can still be improved - at the moment we get an array of all visits in FindVisits. This array is later 5 times iterated to build different lists of IDs which are used to delete data.

It should be possible to iterate this array only once, actually it should be done at the moment when we are fetching the data from the database and all the lists should be produced here. We can probably go as far as not creating the array at all, we should only produce the lists.

However, it is questionable, whether we should do this, or avoid calling FindVisits at all as suggested in bug 409723.
Comment 1 Marco Bonardo [::mak] 2008-01-17 02:51:36 PST
yes, i've not changed all functions to use a different array because this has still to be investigated, probably the best thing would be replace or remove findvisits but if that's not possible we should do this. 

As you said the array could be changed to a simple PRInt64 array of place ids (checked only once) and passed it to clear functions insted of passing the array of results. 

At least we have mitigated the huge queries problem.
Comment 2 Marco Bonardo [::mak] 2008-01-17 02:53:09 PST
marking as perf, this is however not blocking imho
Comment 3 Marco Bonardo [::mak] 2008-01-17 08:52:38 PST
notice that it's true that visits are looped in each function, but it's also true that they are filtered differently (this filtering happens before query and dupes filtering, so it could improve query speed, or be totally useless, should have real numbers on this).
Comment 4 Mike Beltzner [:beltzner, not reading bugmail] 2008-02-20 08:31:29 PST
This will not block the final release of Firefox 3.
Comment 5 Gervase Markham [:gerv] 2009-11-26 06:07:56 PST
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
Comment 6 Marco Bonardo [::mak] 2011-05-02 08:45:01 PDT
fixed with async expiration bug 520165

Note You need to log in before you can comment on or make changes to this bug.