Author Topic: How can I set search delay when typing in a search phrase?  (Read 846 times)

Bamsen

  • Community Member
  • Posts: 66
  • Hero Points: 8
How can I set search delay when typing in a search phrase?
« on: October 11, 2023, 06:15:52 AM »
When I open 'find' in a large file and starts to type the text to search for, the first letters cause a significant delay as SlickEdit finds every occurrence of 'e' in the whole file.
Is it possible to set a delay of f.x. 200ms after each character before searching starts so I can type the whole word before the search is initiated?
---
Morten A. Steien

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6990
  • Hero Points: 533
Re: How can I set search delay when typing in a search phrase?
« Reply #1 on: October 11, 2023, 04:21:20 PM »
As a work around, turn off Search Highlighting

I'll take a look to see if another configuration option could help this.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6990
  • Hero Points: 533
Re: How can I set search delay when typing in a search phrase?
« Reply #2 on: October 13, 2023, 03:59:58 PM »
Currently incremental searching is immediate (not on a timer). It's tool late to change this to a timer (not enough time to test/debug).

Making this option smaller would help:

Tools>Options>Editing>Search>Maximum buffer size for increment search(KB)  (Defaults to 50 megabytes).

However, this turns off incremental searching when you probably could get by just turning off search highlighting for large files.

Graeme

  • Senior Community Member
  • Posts: 2817
  • Hero Points: 347
Re: How can I set search delay when typing in a search phrase?
« Reply #3 on: October 13, 2023, 09:49:34 PM »
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.