docker-tools
docker-tools copied to clipboard
Investigate using watchexec as possible replacement for Watch-Directory tight loop running ROBOCOPY
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:
- It uses less that 1 MB of memory.
- Watching an average Sitecore web application project / deploy folder it seems very good to batch events so it does not trigger too many times.
- Default ignoring glob patters defined in
.gitignoreand supports excluding/including files/folder from parameters.
We need to test this in a container to:
- See if it work at all since it is based on file events from the OS which can work behave differently in a container.
- Measure idle CPU usage / memory to see if there is actual benefits by switching.