The filtering is performed by constructing a DOM on each document and performing a functional evaluation (using the methods defined by the DOM API) to determine whether or not each document is a member of the actual results set, This can result in poor performance when there are a large number of documents in the potential results set.