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

Improvements for cancelable operations #1701

Merged
merged 2 commits into from
Oct 8, 2024
Merged

Improvements for cancelable operations #1701

merged 2 commits into from
Oct 8, 2024

Conversation

spoenemann
Copy link
Contributor

@spoenemann spoenemann commented Sep 26, 2024

  • Use performance.now() for time measurements (see Performance.now vs. Date.now)
  • Use the startCancelableOperation function to reset the lastTick variable: in the current state, interruptAndCheck leads to unnecessary delays at the beginning of an operation because the internal variable used to compare the elapsed time is outdated. This change eliminates those unnecessary delays on document changes.

@spoenemann spoenemann requested a review from msujew September 26, 2024 08:35
@spoenemann spoenemann added this to the v3.3.0 milestone Sep 26, 2024
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we use performance.now() here as well?

- Use performance.now() for time measurements
- Use the startCancelableOperation function to reset the lastTick variable
@spoenemann spoenemann force-pushed the cancelable-operations branch from 5be87ad to 22d3a33 Compare October 2, 2024 06:45
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@msujew msujew merged commit 2e39701 into main Oct 8, 2024
5 checks passed
@msujew msujew deleted the cancelable-operations branch October 8, 2024 12:52
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.

2 participants