Move snippet logic from DB to a cursor wrapper.
This results in a huge performance boost when doing searches and filters across
large Contacts DBs, since the expensive snippet() function (and associated
joins necessary for its logic) no longer need to be run for each record
returned; instead, the snippetization is only done as each entry is retrieved
from the cursor.
If the query string entered by the user consists of multiple tokens, the DB
snippet() function will still be used.
Bug: 4021462
Change-Id: I60ce69b4506bc7f770f139c127f859689b05f2d3
5 files changed