One way to handle this is to write a small "shim" dialog that processes your search string before handing it off to the real search dialog. e.g it could wait for at least 3 characters, then as soon as there's a half second pause of no typing, it passes the search string so far to the real search dialog. If the file is less than a certain size, the real dialog would come up immediately.
You can probably also automatically and dynamically turn search highlighting on/off (or incremental search), according to the file size.