There are multiple problems with the AdvancedPatternParser facility.
The IQuerySpecifications should be produced in the same order that the underlying Patterns are found in the VQL code. Right now, the order they show up in uriMap (as well as the filtered Sets) is nondeterministic.
Less importantly, the implementation of get{Removed|...}Specifications(URI uri) is inefficient: it iterates through all specifications of the specified state from any URI, and then filters them based on whether they happen to come from the right URI. If there are dozens or even hundreds of URIs, it should be much more efficient to iterate over all queries in the URI, and then filter them based on state,
There are multiple problems with the
AdvancedPatternParser
facility.IQuerySpecification
s should be produced in the same order that the underlyingPattern
s are found in the VQL code. Right now, the order they show up inuriMap
(as well as the filtered Sets) is nondeterministic.get{Removed|...}Specifications(URI uri)
is inefficient: it iterates through all specifications of the specified state from any URI, and then filters them based on whether they happen to come from the right URI. If there are dozens or even hundreds of URIs, it should be much more efficient to iterate over all queries in the URI, and then filter them based on state,