Closed
Bug 707946
Opened 12 years ago
Closed 12 years ago
Speed-up hasChildren for tags
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: mak, Assigned: mak)
References
Details
(Keywords: addon-compat, perf)
Attachments
(1 file)
5.26 KB,
patch
|
dietrich
:
review+
Gavin
:
superreview+
|
Details | Diff | Splinter Review |
We already know a tag has children and the tagging service has a nice cache we can leverage.
Assignee | ||
Comment 1•12 years ago
|
||
Will require SR but it's a small change
Attachment #579486 -
Flags: review?(dietrich)
Comment 2•12 years ago
|
||
Comment on attachment 579486 [details] [diff] [review] patch v1.0 Review of attachment 579486 [details] [diff] [review]: ----------------------------------------------------------------- r=me. could this cause the tag service to initialize earlier than previously? if so, should keep an eye on Ts.
Attachment #579486 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Only if you have a copy of the Tags query in your bookmarks toolbar and the toolbar is visible. Otherwise that code path is hit when opening the Library.
Assignee | ||
Comment 4•12 years ago
|
||
Comment on attachment 579486 [details] [diff] [review] patch v1.0 Needs SR for the attribute addition. Note that using allTags.length wouldn't be as performant since allTags does an expensive sorting to return tags sorted by name. I expect in future we may just merge this interface into the bookmarks interface, since we allow to tag bookmarks and having them separated caused more troubles than wins.
Attachment #579486 -
Flags: superreview?(gavin.sharp)
Comment 5•12 years ago
|
||
Comment on attachment 579486 [details] [diff] [review] patch v1.0 >diff --git a/toolkit/components/places/nsITaggingService.idl b/toolkit/components/places/nsITaggingService.idl > interface nsITaggingService : nsISupports >+ /** >+ * Whether there is any tag. >+ */ >+ readonly attribute boolean hasTags; "hasTags" seems a little awkward but I can't come up with anything better. I'd change the comment to "whether any tags exist", though.
Attachment #579486 -
Flags: superreview?(gavin.sharp) → superreview+
Assignee | ||
Comment 6•12 years ago
|
||
fixed the comment, I also added a brief @note regarding the performance difference https://hg.mozilla.org/integration/mozilla-inbound/rev/1b51ee2ee388
Keywords: addon-compat
Target Milestone: --- → mozilla11
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1b51ee2ee388
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•