Re: About Constructions rules

Subject: Re: About Constructions rules
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Thu, 15 Jul 1999 16:08:50 -0500
Quoting Avi Kivity <Avi@xxxxxxxxxxxxx>:
> On Thursday, July 15, 1999 23:31, Chris Maden [SMTP:crism@xxxxxxxxxxx]
> wrote:
> [query construction rules]
> > 
> > But of course, you have to check every node against your list of
> > queries.  With only element construction rules, a very small
> > percentage of all nodes (usually) are candidates for a given
> > construction rule.  Evaluating every node will hose your performance.
> > You can compile queries, of course, but with arbitrary possible
> > expressions, you'll always have potential ratholes.
> > 
> I don't see why. The standard says:
> 
> [...]
> 
> This means that the rule is called, at most, once per grove per mode. If any
> thrashing about is to be done, you have to specify it explicitly. And of
> course it can be done lazily.
> 
   Yes, the query is executed just once to generate the "target" node
list, but Chris is right is saying that *every* node in the grove
would have to be tested against it.  That's every single character,
every attribute assignment, etc.  This brings up the problem of
calling Jade's bluff on the "each character is a separate node" trick.
   Still, given that node lists are opaque (meaning that the processor
can represent them however it wants to), it should be possible to
implement the checks for node membership relatively efficiently.  For
instance, a smart processor should be able to figure out if a query
expression would exclude character nodes entirely, and thus it
wouldn't even have to check them.  This is, of course, a very
simplistic example, but you can see the possibilities.
   In short, I think Chris has a legitimate concern, but that it can
be addressed without extreme difficulty (using methods that are
probably already being used elsewhere in Jade).

-Brandon :)


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread