Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
Jump to bottom
Throttle autosave actions #5679
Open
Throttle autosave actions #5679
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ka0o0 commentedNov 27, 2019
Is your suggestion for improvement related to a problem? Please describe.
While I was debugging for issue #5658 I noticed that when doing a find and replace the save action will be performed for every change in entries.
Describe the solution you'd like
A common way of limiting unnecessary write operations is to introduce some sort of throttling. It works in a way that the application waits for n milliseconds until it actually performs the write operation. If, however, during the time another change has occurring the original task is canceled and the delay is restarted.
Additional context
Java provides a
Timer
class which can be used for this purpose