Closed
Bug 124743
Opened 23 years ago
Closed 23 years ago
RDF SEQ optimizations
Categories
(Core Graveyard :: RDF, defect)
Core Graveyard
RDF
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: mozilla, Assigned: mozilla)
Details
Attachments
(1 file)
|
1.96 KB,
patch
|
tingley
:
review+
bugs
:
superreview+
|
Details | Diff | Splinter Review |
Two things:
1) of Bag/Seq/Alt, Seq is going to be the the highest frequency of positive
hits... so RDF's container utilities should check for SEQs first
2) code which satisfies all of the following:
o has a private in-memory datasource
o uses ONLY RDF_SEQs for containment
o uses RDFContainerUtils->IsContainer() to check for containment
would benefit from using RDFC->IsSEQ() instead, as it does 1/3rd the work.
| Assignee | ||
Comment 1•23 years ago
|
||
| Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
| Assignee | ||
Comment 2•23 years ago
|
||
Chase: care to review?
Comment 3•23 years ago
|
||
Comment on attachment 68797 [details] [diff] [review]
Patch
If you're really trying to squeeze every drop out of IsContainer(), why not
ditch the IsA() calls (each of which calls HasAssertion()) and replace them
with a single call to GetTarget(aResource, kRDF_instanceOf, ...) and a series
of equality checks?
Other than that, sure. r=tingley
Attachment #68797 -
Flags: review+
| Assignee | ||
Comment 4•23 years ago
|
||
Chase: yeah, I thought of that but was a tad leery as aggregation of multiple
datasources could confuse a single GetTarget() call while multiple distinct
HasAssertion()s might succeed. It is a bit farfetched but again I was leery.
Comment 5•23 years ago
|
||
You're right, there is a bit of an issue with composite datasources.
There'd be more of an issue if we did things correctly and used rdf:type
instead of rdf:instanceOf to store container type (bug 15006) (since collisions
between container type and other type information would be more likely -- using
instanceOf, it should only be possible to collide with *other* container types
in the case when a resource somehow had more than one. But getting the correct
one doesn't really matter for the purposes of determining IsContainer()).
Either way, GetTargets() should work. But at that point it may not be faster
any more (although it might be, going by the immutable law that HasAssertion ==
slow :) ). I trust your judgement.
Comment 6•23 years ago
|
||
Attachment #68797 -
Flags: superreview+
| Assignee | ||
Comment 7•23 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•