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

Add delay for autoeval while editing #1387

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sisco0
Copy link

@sisco0 sisco0 commented Oct 23, 2023

Problem description

Issue link: #1318
A crash is observed when a pattern is being evaluated while it's still being edited. This can happen if the auto-evaluation feature is enabled and the pattern is not yet complete or correct, leading to an invalid state.

Implementation description

One way to address this issue is to add a delay to the auto-evaluation trigger. This means the evaluation would only be triggered after the user has stopped typing for a certain period of time, reducing the chance of evaluating an incomplete pattern.

Screenshots

To be tested

Additional things

First contribution, re-works could be possible

@WerWolv
Copy link
Owner

WerWolv commented Oct 24, 2023

Hmm I'm not sure adding a delay is the right way to go. This seems to be a race condition so a delay just makes the issue not appear as frequently anymore but doesn't actually fix the underlying bug.
Thanks a lot for the PR though, I'll look into it some more later

@MattMills
Copy link
Sponsor

Would this make more sense as a config option that defaults to no delay? Personally I'd love to be able to have an execution delay after typing is finished just when editing patterns that take a 5-10 seconds to run, it can kind of annoying when it repeatedly executes with a large pause while still typing when I'm trying to edit the pattern and looking at the data the pattern is generating.

Tangentially, it'd be nice for the pattern to remain in place until the execution completes successfully, often I find I have to undo a bunch of changes mid-edit to get the pattern to run again to figure out what data I'm getting wrong within the data.

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

Successfully merging this pull request may close these issues.

None yet

3 participants