Remove the bookmarks cache

RESOLVED FIXED in mozilla36

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mak, Assigned: ttaubert, Mentored)

Tracking

(Blocks 1 bug)

Trunk
mozilla36
Points:
3
Dependency tree / graph
Bug Flags:
firefox-backlog +
in-testsuite -
qe-verify -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 5 obsolete attachments)

Reporter

Description

5 years ago
The bookmarks cache is not reliable with a concurrent async API, before we use the new API in the product, we must remove the cache.
Flags: qe-verify-
Flags: in-testsuite-
Flags: firefox-backlog+
A DXR link and a mentor here would make this a good mentored bug, I bet!
Flags: needinfo?(mak77)
Reporter

Comment 2

5 years ago
Sure, we must remove code from nsNavBookmarks.h and nsNavBookmarks.cpp
Anything that refers to:
BookmarkKeyClass
mRecentBookmarksCache
mUncachableBookmarks
RECENT_BOOKMARKS_INITIAL_CACHE_LENGTH
RECENT_BOOKMARKS_THRESHOLD
BEGIN_CRITICAL_BOOKMARK_CACHE_SECTION
END_CRITICAL_BOOKMARK_CACHE_SECTION
ADD_TO_BOOKMARK_CACHE
ExpireNonrecentBookmarksCallback
ExpireNonrecentBookmarks
ExpireRecentBookmarksByParentCallback
ExpireRecentBookmarksByParent

and any supporting code

http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/nsNavBookmarks.cpp
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/nsNavBookmarks.h
Mentor: mak77
Flags: needinfo?(mak77)
Whiteboard: [good second bug][lang=cpp]
Killer, thanks!
Whiteboard: [good second bug][lang=cpp] → [good next bug][lang=c++]

Comment 4

5 years ago
BookmarkKeyClass is a class, Should i remove it also.
Reporter

Comment 5

5 years ago
(In reply to Himanshu Singh from comment #4)
> BookmarkKeyClass is a class, Should i remove it also.

yes, it's only used by the cache.

You asked me on IRC about mCacheObservers, this is a different cache that we still need (category cache).
I asked about mCacheObservers on IRC (unless Himanshu Singh asked as well). If Himanshu Singh wants to take up this bug, I'll stop working on it.

Comment 7

5 years ago
I am new to fixing bugs. I have removed the Bookmarks cache code from the main code.Please guide me what further I can do?
Flags: needinfo?(mak77)
Attachment #8507514 - Flags: review+
Attachment #8507514 - Flags: feedback+

Comment 8

5 years ago
Posted patch nsNavBookmarks.h (obsolete) — Splinter Review
Changed the nsNavBookmarks.h file too
Attachment #8507514 - Attachment is obsolete: true
Flags: needinfo?(mak77)
Reporter

Comment 10

5 years ago
(In reply to Yasaswy Kota [:caber] from comment #6)
> I asked about mCacheObservers on IRC (unless Himanshu Singh asked as well).
> If Himanshu Singh wants to take up this bug, I'll stop working on it.

oops sorry, my fault.

(In reply to Nihar Mehta from comment #9)
> Created attachment 8507520 [details]
> I had removed mCacheObservers by mistake.. Rectified it here.

could you please attach only diffs and not whole files?

Comment 11

5 years ago
Posted patch Diff for nsNavBookmarks.c (obsolete) — Splinter Review
I have added the diff for the nsNavBookmarks.c
Attachment #8507519 - Attachment is obsolete: true
Attachment #8507520 - Attachment is obsolete: true
Attachment #8508147 - Flags: review+

Comment 12

5 years ago
Posted patch Diff for nsNavBookmarks.h (obsolete) — Splinter Review
Here is the patch for the nsNavBookmarks.h file
Attachment #8508148 - Flags: review+
Reporter

Updated

5 years ago
Attachment #8508148 - Flags: review+
Reporter

Comment 13

5 years ago
Comment on attachment 8508147 [details] [diff] [review]
Diff for nsNavBookmarks.c

sorry, you need to ASK for review once the patches are ready...

Though your patches are in the wrong format, please check
https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
or
https://developer.mozilla.org/en-US/docs/Creating_a_patch_that_can_be_checked_in
Attachment #8508147 - Flags: review+
Reporter

Comment 14

5 years ago
Hi, Is there anything else I can do to help you? do you need any further help with the patch format?
Flags: needinfo?(niharmehta79)
Taking this bug as we unfortunately didn't hear back from the contributor and it's blocking the Bookmarks.jsm transition.
Assignee: nobody → ttaubert
Attachment #8508147 - Attachment is obsolete: true
Attachment #8508148 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Flags: needinfo?(niharmehta79)
Attachment #8520717 - Flags: review?(mak77)
Iteration: --- → 36.3
Whiteboard: [good next bug][lang=c++]
Reporter

Comment 16

5 years ago
Comment on attachment 8520717 [details] [diff] [review]
0001-Bug-1083462-Remove-the-bookmarks-cache.patch

Review of attachment 8520717 [details] [diff] [review]:
-----------------------------------------------------------------

thank you
Attachment #8520717 - Flags: review?(mak77) → review+
https://hg.mozilla.org/mozilla-central/rev/a4d2e72afc42
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
Comment hidden (Legacy TBPL/Treeherder Robot)
You need to log in before you can comment on or make changes to this bug.