Open NV opened 14 years ago
Watchers are set up for directories, not for particular files. So
find ~ -type d | wc -l
Anyway, watching whole $HOME is not expected to work, so I'm inclined to close as 'wontfix'.
Unfortunately, monitoring HOME is not a good idea at the moment, since LR has to keep the whole file tree in memory for comparisons, and you likely do not want to wait for it to build it on each start up.
Also, on Linux, the number of watched directories on a single inotify handle is limited, and we're just using one handle. Using multiple handles when necessary would be a nice fix to have if someone is willing to contribute.
I don't see why LR startup should take much longer than it takes to run find ~
, so if someone can step in, fix inotify handles limit and then make reading a list of directories faster, LR should be able to work from $HOME.
I'm changing this from wontfix to help-wanted-otherwise-wontfix :)
Sites ➤ find . -type d | wc -l 5897 Sites ➤ livereload Version: 1.4 (compatible with browser extension versions 1.4.x) Port: 35729 Watching: /Users/nikitavasilev/Sites - extensions: .html .css .js .png .gif .jpg .php .php5 .py .rb .erb - excluding changes in: */.git/* */.svn/* */.hg/* - with a grace period of 0.05 sec after each change
LR works, but ruby process takes 100% CPU. It's pretty bad when outside is +40°C :)
However, It works well with a few directories.
100% CPU means it's still loading the directory tree. I have no idea why it takes so long (wild guess: stat()
'ing each file is wildly inefficient, and find(1) only uses the info provided by directory scanning functions). That's the area where I want to see contributions.
CPU was warm, but livereload wasn't working. I was waiting for about 10 minutes, but nothing changed. I suppose, it scans files, but doesn't show me any progress bar.
Then I pressed Ctrl + C
I would say how many files I have if I knew how to measure.