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

feat: Add suspend and resume actions to watchers #2359

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

Conversation

taratatach
Copy link
Member

@taratatach taratatach commented Nov 5, 2024

When we started reacting to OS's suspend and resume events, we took
the simple route of stopping and restarting both the remote and local
watchers each time.

However, this is time consuming, especially with the local watcher
since it does a full scan of the local synchronization directory on
start, and quite unnecessary since there little change we missed a
local event while the computer was suspended.

This is why we now introduce suspend and resume actions which, for the
local watcher at least, only take care of stopping and restarting
their event subscriptions.
This should improve performance when resuming a suspended computer.

For now the remote watcher still does a complete stop and restart as
it does not trigger expensive computing.

Please make sure the following boxes are checked:

  • PR is not too big
  • it improves UX & DX in some way
  • it includes unit tests matching the implementation changes
  • it includes scenarios matching a new behaviour or has been manually tested
  • it includes relevant documentation

@taratatach taratatach self-assigned this Nov 5, 2024
@taratatach taratatach requested a review from nono November 5, 2024 16:13
  When we started reacting to OS's suspend and resume events, we took
  the simple route of stopping and restarting both the remote and local
  watchers each time.

  However, this is time consuming, especially with the local watcher
  since it does a full scan of the local synchronization directory on
  start, and quite unnecessary since there little change we missed a
  local event while the computer was suspended.

  This is why we now introduce suspend and resume actions which, for the
  local watcher at least, only take care of stopping and restarting
  their event subscriptions.
  This should improve performance when resuming a suspended computer.

  For now the remote watcher still does a complete stop and restart as
  it does not trigger expensive computing.
@taratatach taratatach force-pushed the feat/add-suspend-resume-actions-to-watchers branch from 2f30015 to 1c38a40 Compare November 5, 2024 16:55
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