Closed
Bug 395066
Opened 17 years ago
Closed 17 years ago
Hang when trying to clear browsing history
Categories
(Firefox :: Bookmarks & History, defect, P1)
Firefox
Bookmarks & History
Tracking
()
VERIFIED
FIXED
Firefox 3 beta1
People
(Reporter: martijn.martijn, Assigned: dietrich)
Details
Attachments
(2 files, 2 obsolete files)
5.42 KB,
patch
|
mconnor
:
approval1.9+
|
Details | Diff | Splinter Review |
5.33 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
When trying to clear my private data, current trunk Firefox hung. It took long enough to be annoyed by it (>10s), so I killed the Firefox process. It happened even when I only had the "Browsing History" option checked. I had a lot of history items in there. With the SQLite data browser I got40300 for the amount of moz_historyvisits. And my places.sqlite file had 14MB as size, in case that matters.
Comment 1•17 years ago
|
||
The trunk is currently very slow when clearing history, just wait until it's finished. Since we're now storing history for 180 days by default, this has become much annoying. It will takes minutes ! And because there's no progress dialogbox, people will assume that Firefox is hanging. Too bad that Sqlite doesn't offer a "truncate table" command :-( Maybe as a workaround (if we don't find ther cause), we can drop the tablr and recreate it ?
Reporter | ||
Comment 2•17 years ago
|
||
That sounds bad, and I think this will be something that people will encounter.
Flags: blocking-firefox3?
Comment 3•17 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a8pre) Gecko/2007090614 Minefield/3.0a8pre ID:2007090614 I have a 45.1MB places.sqlite file and a 45 day browsing history. I made a new profile, copied my usual places.sqlite to it, started firefox up with the new profile, Tools > Clear Private Data, and chose to just clear my browsing history. It took my AlthonXP2400 on win2k _1hr32min_ of 99% CPU usage to clear the browser history.
Comment 4•17 years ago
|
||
thanks (as always) to martjin, jo and steve. I'll take a look into this ASAP.
Assignee: nobody → sspitzer
Assignee | ||
Comment 5•17 years ago
|
||
Here's the breakdown of time in ExpireItems() in seconds, when clearing history in my places.sqlite of 25mb: FindVisits: 0 EraseVisits: 1 EraseHistory: 12 EraseFavicons: 0 EraseAnnos: 36
Comment 6•17 years ago
|
||
For EraseAnnotations, can't we use the same optimization as in bug 386711, issuing a single sql-statement with an in-expression (see EraseVisits) ?
Assignee | ||
Comment 7•17 years ago
|
||
(In reply to comment #6) > For EraseAnnotations, can't we use the same optimization as in bug 386711, > issuing a single sql-statement with an in-expression (see EraseVisits) ? > Yes, that's what I'm currently writing :)
Assignee | ||
Comment 8•17 years ago
|
||
Assignee | ||
Comment 9•17 years ago
|
||
(In reply to comment #8) > Created an attachment (id=280125) [details] > fix 1 - fixes EraseAnnotations > this brought EraseAnnotations from 36 secs to <0 secs w/ my profile.
Assignee | ||
Comment 10•17 years ago
|
||
removes unnecessary anno svc.
Attachment #280125 -
Attachment is obsolete: true
Attachment #280127 -
Flags: review?(sspitzer)
Attachment #280125 -
Flags: review?(sspitzer)
Comment 11•17 years ago
|
||
Comment on attachment 280127 [details] [diff] [review] fix 1 - fixes EraseAnnotations (v2) r=sspitzer, but 1) don't check in your timing / printf code. 2) use nsCString instead of nsCAutoString, as mentioned over irc, because, for lots of ids nsAutoString / nsCAutoString- derived from nsString, a string which owns a 64 code unit buffer in the same storage space as the string itself. If a string less than 64 code units is assigned to an nsAutoString, then no extra storage will be allocated. For larger strings, a new buffer is allocated on the heap.
Attachment #280127 -
Flags: review?(sspitzer) → review+
Updated•17 years ago
|
Flags: in-litmus?
Comment 12•17 years ago
|
||
I think dietrich also has a fix for EraseHistory(). dietrich, do you think this will make m8?
OS: Windows XP → All
Hardware: PC → All
Assignee | ||
Comment 13•17 years ago
|
||
cleaned up patch, carrying over r=sspitzer. requestion 1.9 approval: this fixes the bug to a large extent. i'm still working on fixing EraseHistory(), but as that's the lesser problem, we shouldn't block on getting this in for M8.
Attachment #280127 -
Attachment is obsolete: true
Attachment #280178 -
Flags: approval1.9?
Updated•17 years ago
|
Attachment #280178 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 14•17 years ago
|
||
checked in the fix to annotations. i'm still working on a fix for deleting moz_places records, so leaving this bug open. reporter(s), please comment with how long it takes after this fix. Checking in toolkit/components/places/src/nsNavHistoryExpire.cpp; /cvsroot/mozilla/toolkit/components/places/src/nsNavHistoryExpire.cpp,v <-- nsNavHistoryExpire.cpp new revision: 1.16; previous revision: 1.15 done Checking in toolkit/components/places/tests/unit/test_expiration.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_expiration.js,v <-- test_expiration.js new revision: 1.7; previous revision: 1.6 done
Priority: -- → P1
Target Milestone: --- → Firefox 3 M9
Comment 15•17 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a8pre) Gecko/2007091002 Minefield/3.0a8pre With a new profile and my existing places.sqlite (45.1MB, 45 day history), Clear Private Data took 4m12s to clear my history - a vast improvement from over an hour and a half!
Comment 16•17 years ago
|
||
Litmus Triage Team: further discussion is needed about the best way to create a Litmus case around this. Perhaps if we have a dirty profile from my profile project that can be accessed, it could be worked.
Comment 17•17 years ago
|
||
as done in the other functions, you could add also into eraseAnnotation an early return to avoid the query if there are no ids to delete if (placeIds.IsEmpty()) return NS_OK; and probably nsCAutoString in other erase functions could be converted to nsCString per comment #11 On my 28MB places.sqlite clear history (only browsing history) took about 1,55 minutes
Comment 18•17 years ago
|
||
i've tried with different queries on erasehistory, the only one i got an advantage is this, i moved from 1,55 minutes to 1,35 minutes, so if someone wants to give it a try... other queries did not move the timing, even if they were more compact this does also the cleanup on autostring and early return
Updated•17 years ago
|
Flags: blocking-firefox3? → blocking-firefox3+
Assignee | ||
Comment 19•17 years ago
|
||
Comment on attachment 280878 [details] [diff] [review] attempted patch to erasehistory (and cleanup) this looks good, and passes the unit tests. thanks Marco!
Attachment #280878 -
Flags: review+
Comment 20•17 years ago
|
||
does this need other reviews? if not this should be checkin-needed
Reporter | ||
Updated•17 years ago
|
Keywords: checkin-needed
Comment 21•17 years ago
|
||
Checking in toolkit/components/places/src/nsNavHistoryExpire.cpp; /cvsroot/mozilla/toolkit/components/places/src/nsNavHistoryExpire.cpp,v <-- nsNavHistoryExpire.cpp new revision: 1.17; previous revision: 1.16 done
Keywords: checkin-needed
Assignee | ||
Updated•17 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 22•17 years ago
|
||
Things such as hangs, crashes and other general nastiness are implicit failures for any test case. The test case for clearing browser history is already in Litmus: https://litmus.mozilla.org/show_test.cgi?id=4141 also marking verified per comments stating vast clear history improvement.
Status: RESOLVED → VERIFIED
Flags: in-litmus? → in-litmus+
Comment 23•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
•