Adding search in background thread

When the list of source array is huge we want to perform a background search to prevent UI from getting laggy. This commit allows to do just that. It adds a configuration flag, turned off by default, which allows user to perform search in background thread.