Don't rewrite queries when filtering project watches
In the context of ProjectWatch, ChangeQueryRewriter may be bound to an
index-based rewriter. The current implementation of the index rewriter
may call getSource() during the course of rewriting, possibly kicking
off an async query. However, for the purpose of watches, we only ever
call match() on the predicate; we never need to actually enumerate the
results.
Don't bother rewriting the predicates; the rewriter is about querying
the database more efficiently, but all we're doing is evaluating the
predicate on a change. It is likely that the cost of applying the
rewrite algorithm outweighs any benefit of using a simplified
predicate tree.
Change-Id: I3a6e867305b0e1e4956ccdee8113827b04e63580
2 files changed