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

Investigate using watchexec as possible replacement for Watch-Directory tight loop running ROBOCOPY #9

Open
pbering opened this issue Feb 2, 2021 · 0 comments

Comments

@pbering
Copy link

pbering commented Feb 2, 2021

Local tests of https://github.com/watchexec/watchexec shows promising results as a possible replacement of https://github.com/Sitecore/docker-tools/blob/main/image/src/scripts/Watch-Directory.ps1#L185. The current loop uses 2-3% CPU when idle where watchexec uses 0.

Other observations while testing watchexec:

  1. It uses less that 1 MB of memory.
  2. Watching an average Sitecore web application project / deploy folder it seems very good to batch events so it does not trigger too many times.
  3. Default ignoring glob patters defined in .gitignore and supports excluding/including files/folder from parameters.

We need to test this in a container to:

  1. See if it work at all since it is based on file events from the OS which can work behave differently in a container.
  2. Measure idle CPU usage / memory to see if there is actual benefits by switching.
@pbering pbering changed the title Investigate using watchexec as possible replacement for Watch-Directory tight loop running ROBOCOBY Investigate using watchexec as possible replacement for Watch-Directory tight loop running ROBOCOPY Feb 5, 2022
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

No branches or pull requests

1 participant