If I use the new find function (ctrl-f) in a bigger script, it hangs Mudlet.
I suspect that this happens because the search is already happening during typing,
if I copy paste something I want to find into the search bar it doesn't happen.
Mudlet shouldn't hang
Mudlet 4.8.2
Ubuntu 20.04
Probably it shouldn't start to find results immediately when I start typing but only after pressing enter.
Good find on the issue!
Using on enter is one way to solve it - although you can also still make it work without the extra key using a technique called "debounce". Basically, setup a timer after every time a key is pressed for say 300ms (killing any old timer), and only when the times runs out, do a search. That way it won't search for every letter but only when you finish typing.
Probably it shouldn't start to find results immediately when I start typing but only after pressing enter.
Comparing browsers or IDE etc. most search without additional enter, but probably some 0.1 seconds delay after last keystroke or alike.
High priority as Mudlet should be all about performance, not hanging.
Comparing browsers or IDE etc. most search without additional enter, but probably some 0.1 seconds delay after last keystroke or alike.
Yes, that's true, after copying the script into vscode I noticed that it works like that, (maybe the comparison is unfair) but in vscode I didn't notice the slightest delay as Mudlet hangs for about a minute before it's usable again.
The issue is in edbee trying to highlight so many things. See the linked PR for an workaround, and I've asked edbee in https://github.com/edbee/edbee-lib/issues/99 whenever we can do things better.