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

Merged
merged 1 commit into from
Dec 18, 2024

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
@taratatach taratatach force-pushed the feat/add-suspend-resume-actions-to-watchers branch from 2f30015 to 1c38a40 Compare November 5, 2024 16:55
@taratatach taratatach force-pushed the feat/add-suspend-resume-actions-to-watchers branch from 1c38a40 to 10c7343 Compare November 15, 2024 16:13
@taratatach taratatach force-pushed the feat/add-suspend-resume-actions-to-watchers branch 2 times, most recently from fac7c83 to d0ddb74 Compare December 18, 2024 11:59
  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 d0ddb74 to 8a31e2d Compare December 18, 2024 13:08
@taratatach taratatach merged commit 51f11b9 into master Dec 18, 2024
11 of 16 checks passed
@taratatach taratatach deleted the feat/add-suspend-resume-actions-to-watchers branch December 18, 2024 13:09
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