Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use find (ctrl-f) in a bigger script hangs Mudlet #3846

Closed
Edru2 opened this issue May 29, 2020 · 5 comments · Fixed by #3847
Closed

use find (ctrl-f) in a bigger script hangs Mudlet #3846

Edru2 opened this issue May 29, 2020 · 5 comments · Fixed by #3847
Assignees

Comments

@Edru2
Copy link
Member

Edru2 commented May 29, 2020

Brief summary of issue / Description of requested feature:

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.

Steps to reproduce the issue / Reasons for adding feature:

  1. Have a bigger script/ install a bigger script for example EMCO (download here https://github.com/demonnic/EMCO/releases/download/1.6/EMCO.xml)
  2. Open the script in the script manager
  3. use ctrl-f to open the search bar
  4. try to find something (for example tab) in the searchbar
  5. after starting to type Mudlet hangs

Error output / Expected result of feature

Mudlet shouldn't hang

Extra information, such as Mudlet version, operating system and ideas for how to solve / implement:

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.

@vadi2
Copy link
Member

vadi2 commented May 29, 2020

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.

@Kebap
Copy link
Contributor

Kebap commented May 29, 2020

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.

@vadi2
Copy link
Member

vadi2 commented May 29, 2020

High priority as Mudlet should be all about performance, not hanging.

@Edru2
Copy link
Member Author

Edru2 commented May 29, 2020

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.

@vadi2
Copy link
Member

vadi2 commented May 29, 2020

The issue is in edbee trying to highlight so many things. See the linked PR for an workaround, and I've asked edbee in edbee/edbee-lib#99 whenever we can do things better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants