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

Support for specifying timeout for iter_inline_changes() #60

Closed
andreasscherman opened this issue Mar 27, 2024 · 0 comments · Fixed by #61
Closed

Support for specifying timeout for iter_inline_changes() #60

andreasscherman opened this issue Mar 27, 2024 · 0 comments · Fixed by #61

Comments

@andreasscherman
Copy link

andreasscherman commented Mar 27, 2024

Hi!

Thanks a lot for this crate. I've really enjoyed using it.

I had some issues with timings where I couldn't figure out why my loop was slower than the TextDiff::from_lines() call. Instrumentation led me to finding out the iter_inline_changes() have a static cap at 500ms. I think it would be good to be able to specify a deadline for this function too. An issue where this shows up is in the terminal-inline.rs example, where if you have a sufficiently large file and have a small timeout for the TextDiff::from_lines(), the loop afterwards can still add 500ms.

Let me know if you think it makes sense, and I'll try to put together a PR if I get the time.

Thanks!

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 a pull request may close this issue.

1 participant