Closed
Bug 401980
Opened 17 years ago
Closed 17 years ago
use a simpler query than mDBGetURLPageInfo for IsURIStringVisited
Categories
(Firefox :: Bookmarks & History, defect)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
Firefox 3 beta3
People
(Reporter: moco, Assigned: mak)
Details
(Keywords: perf)
Attachments
(3 files)
1.54 KB,
patch
|
moco
:
review+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
1.54 KB,
patch
|
Details | Diff | Splinter Review | |
3.50 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
use a simpler query than mDBGetURLPageInfo for IsURIStringVisited all we care about is if visit count is > 0, but our query is: "SELECT h.id, h.url, h.title, h.rev_host, h.visit_count FROM moz_places h WHERE h.url = ?1" Why not: "SELECT h.visit_count FROM moz_places h WHERE h.url = ?1"
Reporter | ||
Comment 1•17 years ago
|
||
maybe with a with tons and tons of links (http://lxr.mozilla.org/seamonkey/source/layout/base/nsCSSFrameConstructor.cpp) fixing this could have a measurable performance impact?
Assignee | ||
Comment 2•17 years ago
|
||
from an sql perspective there is no difference, both queries takes about 0,22ms, the only difference will be in memory consumption due to h.url, h.title and h.rev_host that are (could be) long text fields. For this reason a good choice could be use mDBGetPageVisitStats instead of mDBGetURLPageInfo "SELECT id, visit_count, typed, hidden " "FROM moz_places " "WHERE url = ?1" this will add only typed and hidden that are int, should be memory friendly enough without adding a new statement
Reporter | ||
Comment 3•17 years ago
|
||
Comment on attachment 293490 [details] [diff] [review] use mDBGetPageVisitStats instead of mDBGetURLPageInfo for visit count r=sspitzer, thanks marco. if we get approval, I'll land for you. it sounds like, which this might not show up in Tp, it could affect MH test.
Attachment #293490 -
Flags: review?(sspitzer)
Attachment #293490 -
Flags: review+
Attachment #293490 -
Flags: approval1.9?
Reporter | ||
Updated•17 years ago
|
Target Milestone: --- → Firefox 3 M11
Updated•17 years ago
|
Attachment #293490 -
Flags: approval1.9? → approval1.9+
Reporter | ||
Comment 4•17 years ago
|
||
Reporter | ||
Comment 5•17 years ago
|
||
fixed, thanks again marko. Checking in nsNavHistory.cpp; /cvsroot/mozilla/toolkit/components/places/src/nsNavHistory.cpp,v <-- nsNavHistory.cpp new revision: 1.215; previous revision: 1.214 done while we can't test IsURIStringVisited() directly, we can and should test nsNavHistory::IsVisited(), so adding in test suite ?.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Flags: in-litmus-
Resolution: --- → FIXED
Reporter | ||
Comment 6•17 years ago
|
||
> it sounds like, which this might not show up in Tp, it could affect MH test. it didn't show up anywhere, but I'm still glad we fixed it, thanks marco. see also bug #408790 which I found while testing your patch.
Reporter | ||
Comment 7•17 years ago
|
||
note, we do have one test for isVisited() already, see http://lxr.mozilla.org/mozilla/source/docshell/test/unit/test_nsIDownloadHistory.js, but this tests something else. we really should test isVisited() in places. note, part of this test will fail because of bug #408790 so it is commented out. once we fix that bug, we can uncomment (and complete) the test of uris that we block from history.
Attachment #293736 -
Flags: review?(dietrich)
Comment 8•17 years ago
|
||
Comment on attachment 293736 [details] [diff] [review] test r=me, thanks for adding this. yes, we need to go though and find other areas of the API that also do not have breadth testing like this.
Attachment #293736 -
Flags: review?(dietrich) → review+
Reporter | ||
Comment 9•17 years ago
|
||
test checked in, thanks dietrich once I have a fix for bug #408790, I'll re-enable the commented out parts (and finish testing other schemes which should be blocked from history.) Checking in test_isvisited.js; /cvsroot/mozilla/toolkit/components/places/tests/unit/test_isvisited.js,v <-- test_isvisited.js initial revision: 1.1 done
Flags: in-testsuite? → in-testsuite+
Comment 10•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
•