Task: determine if we want watch poll or real file system events #3384
Description
Esbuild watch api actually uses polling (i dindt know) so lets discuss if we are fine with that or not (in this case we can work around it some how ^^).
As described here https://esbuild.github.io/api/#watch
Watch mode in esbuild is implemented using polling instead of OS-specific file system APIs for portability. The polling system is designed to use relatively little CPU vs. a more traditional polling system that scans the whole directory tree at once. The file system is still scanned regularly but each scan only checks a random subset of your files, which means a change to a file will be picked up soon after the change is made but not necessarily instantly.
With the current heuristics, large projects should be completely scanned around every 2 seconds so in the worst case it could take up to 2 seconds for a change to be noticed. However, after a change has been noticed the change's path goes on a short list of recently changed paths which are checked on every scan, so further changes to recently changed files should be noticed almost instantly.
Do you feel like the current watch performance could be improved on your dev mashine or should we keep it as is?