Closed Bug 1083462 Opened 10 years ago Closed 10 years ago

Remove the bookmarks cache

Categories

(Toolkit :: Places, defect)

defect
Not set
normal
Points:
3

Tracking

()

RESOLVED FIXED
mozilla36
Iteration:
36.3

People

(Reporter: mak, Assigned: ttaubert, Mentored)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 5 obsolete files)

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)
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++]
BookmarkKeyClass is a class, Should i remove it also.
(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.
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+
Attached patch nsNavBookmarks.h (obsolete) — Splinter Review
Changed the nsNavBookmarks.h file too
Attachment #8507514 - Attachment is obsolete: true
Flags: needinfo?(mak77)
(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?
Attached 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+
Attached patch Diff for nsNavBookmarks.h (obsolete) — Splinter Review
Here is the patch for the nsNavBookmarks.h file
Attachment #8508148 - Flags: review+
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+
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++]
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: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: