I have made some experiments with a different approach: I wrote a “Fulltext search” addon that can make quite fast searches across the whole database (well, on selected attributes only). See gramps/addons/Fulltext at master · kkujansuu/gramps · GitHub.
It may be possible to integrate this also with the sidebar Filter gramplet - at least for searching people by name.