Closed Bug 124743 Opened 24 years ago Closed 24 years ago

RDF SEQ optimizations

Categories

(Core Graveyard :: RDF, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla0.9.9

People

(Reporter: mozilla, Assigned: mozilla)

Details

Attachments

(1 file)

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.
Attached patch PatchSplinter Review
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
Chase: care to review?
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+
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.
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.
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
tever is not RDF QA anymore
QA Contact: tever → nobody
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: