Closed Bug 655723 Opened 14 years ago Closed 7 years ago

excludebackup annotation check in bookmarks.js::_ignore() is inefficient

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mak, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [sync:bookmarks])

for each examinated id it does: // Make sure to remove items that have the exclude annotation. if (Svc.Annos.itemHasAnnotation(itemId, EXCLUDEBACKUP_ANNO)) { this.removeChangedID(this._GUIDForId(itemId)); return true; } itemHasAnnotation is a query to the database, since excluded items are a really small number, we should rather add a cached getter in PlacesUtils, like we did for readonly annotation (see PlacesUtils._readOnly), and then query through a PlacesUtils.itemIsReadOnlyFolder(itemId);
ehr, I meant PlacesUtils.itemIsExcludedFromBackup(itemId);
mak: I'm putting a dep on anno lookup improvements, but do you have a bug for the work you suggest in Comment 0?
Depends on: 822996
Flags: needinfo?(mak77)
OS: Windows 7 → All
Hardware: x86 → All
Whiteboard: [sync:bookmarks]
nope, though it's easy to do, just copying http://mxr.mozilla.org/mozilla-central/source/toolkit/components/places/PlacesUtils.jsm#239 to an _excludeFromBackup and exposing a PlacesUtils.shouldExcludeFromBackup(aItemId) that uses _excludeFromBackup internally.
Flags: needinfo?(mak77)
`excludeFromBackup` is no longer a thing.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.