Tune performance of palette file searches

With these changes I can use the palette file search on the chromium source code. I also fixed what I think is a bug in the debouncing.
I had it like that originally but changed it as I wasn't limiting the results then and it was unusable. With the results limit it should be fine, but I'll test it today to make sure. I can put up another pull request once tested.

BTW I'm in Sydney so my 'today' is probably not your today :)