Skip to content

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

@pbering

Description

@pbering

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions