I dug into this problem to solve performance issue with watching large folders. @smithwib seems to be correct with a small change in the if statement. I added a test case to check readdirSync call count. With the fix number of directory listings reduced from 8 to 4 in the addToWatched test.
Hi,
I dug into this problem to solve performance issue with watching large folders. @smithwib seems to be correct with a small change in the if statement. I added a test case to check readdirSync call count. With the fix number of directory listings reduced from 8 to 4 in the addToWatched test.