You have no idea at all how "slow" this approach will be, because right now the performance of YOUR algorithm is infinitely bad - it produces absolutely no results no matter how long you wait.
How about actually IMPLEMENTING something instead of whining about speed you can't even properly measure because you have nothing to compare it to? Only then will you be able to tell if performance is acceptable or not, and only then will you be able to compare performance of one approach over another.
Hint: you are making this simple problem much, much, much too hard. Stop generating excuses and generate some code, instead.
I'm not seeing any actual code, text or keyword examples. Obviously, the code doesn't exist, but the text and keyword examples are critical to understanding what your problem actually is, given that your descriptions are vague and continue to change.
Bookmarks