Closed Bug 727309 Opened 14 years ago Closed 14 years ago

LocalBrowserDB needlessly computes URI + profile

Categories

(Firefox for Android Graveyard :: General, defect)

11 Branch
ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 13

People

(Reporter: rnewman, Assigned: rnewman)

References

Details

Attachments

(1 file, 1 obsolete file)

The profile is private, and only set in the constructor. Every call to appendProfile can turn into a member access. This will save a pile of garbage and a method call in almost every DB access.
Depends on: 724745
Attached patch WIP. v1 (obsolete) — Splinter Review
This hasn't finished building yet, but otherwise shows my intent :)
Attachment #597257 - Flags: feedback?(lucasr.at.mozilla)
Comment on attachment 597257 [details] [diff] [review] WIP. v1 Review of attachment 597257 [details] [diff] [review]: ----------------------------------------------------------------- Makes sense. ::: mobile/android/base/db/LocalBrowserDB.java @@ +79,5 @@ > > private final String mProfile; > private long mMobileFolderId; > > + private final Uri bookmarksUriWithProfile; Prefix all those members with 'm' for consistency.
Attachment #597257 - Flags: feedback?(lucasr.at.mozilla) → feedback+
Rebased on top of current inbound. Nit addressed. One more method (introduced in the last day!) eliminated :)
Attachment #597257 - Attachment is obsolete: true
Attachment #597451 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 597451 [details] [diff] [review] Proposed patch. v1 Review of attachment 597451 [details] [diff] [review]: ----------------------------------------------------------------- Good. ::: mobile/android/base/db/LocalBrowserDB.java @@ +92,5 @@ > + > + mBookmarksUriWithProfile = appendProfile(Bookmarks.CONTENT_URI); > + mParentsUriWithProfile = appendProfile(Bookmarks.PARENTS_CONTENT_URI); > + mHistoryUriWithProfile = appendProfile(History.CONTENT_URI); > + mImagesUriWithProfile = appendProfile(Images.CONTENT_URI); nit: we don't align assignments like this in Fennec :-) No alignment needed here.
Attachment #597451 - Flags: review?(lucasr.at.mozilla) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 13
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: