Opened 15 years ago

Closed 15 years ago

#432 closed enhancement (fixed)

valuestreams not used by OP_VALUE_RANGE

Reported by: Richard Boulton Owned by: Olly Betts
Priority: normal Milestone: 1.2.1
Component: Matcher Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description

The valuestream documents are not currently being used by OP_VALUE_RANGE (and also OP_VALUE_GE, etc) as far as I can tell. My main evidence for this is some profiling traces of a pure VALUE_RANGE search which doesn't call any ValueStreamDocument methods, but I also can't see any code which would allow a ValueStreamDocument to be used.

I'd expected ValueStreamDocument to be used for these, since it should reduce the amount of seeking around they need to do, and speed them up considerably. I think the ValueStreamDocument would need to become a member of MultiMatch, be created in the constructor, and passed to LocalSubMatch, and on to the query optimiser, to allow it to be used.

Change History (3)

comment:1 by Olly Betts, 15 years ago

Summary: valuestream document not used by OP_VALUE_RANGEvaluestreams not used by OP_VALUE_RANGE
Type: defectenhancement

ValueStreamDocument is only required because we need to be able to pass a Document object to user subclassable functors. OP_VALUE_RANGE only needs to read values from a single document slot, so should just use a valuestream iterator directly.

If we're worried about sharing a valuestream between filtering and sorting, etc then we should push the sharing mechanism into a separate place which just returns a shared valuestream iterator which we can use here, rather than forcing access through a Document proxy (which adds needless overhead) to achieve this.

Marking as an enhancement, since this isn't buggy, just slower than it could be.

comment:2 by Olly Betts, 15 years ago

Milestone: 1.2.x1.2.1

Marking for 1.2.1 - it shouldn't be hard to hook this up in a simple way at least.

comment:3 by Olly Betts, 15 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk r14496. Valuestreams weren't in 1.0.x, so nothing to backport.

Note: See TracTickets for help on using tickets.