rhysd / Shiba

Rich markdown live preview app with linter
774 stars 55 forks source link

Overhead CPU MacOS #35

Closed arielril closed 7 years ago

arielril commented 7 years ago

Whenever I open Shiba, with or without a file, my CPU percentage goes up to 180%.

rhysd commented 7 years ago

How did you install and launch Shiba?

arielril commented 7 years ago

I've installed with brew and started at the applications folder and after that I've installed with your download package for Mac os and the same thing to open

rhysd commented 7 years ago

ok, I'll try to repro. CPU usage is often high when watching directory has so many entries.

arielril commented 7 years ago

Thanks

rhysd commented 7 years ago

I tried this but Shiba only takes 0.8% of CPU.

Shiba watches ~/Documents (recursively) by default on macOS. Do you have so many files in the directory?

arielril commented 7 years ago

Yes, I have a lot of files there

rhysd commented 7 years ago

ok, I'll find a directory which contains so many files and try with it.

rhysd commented 7 years ago

@arielril Could you tell me the number of entities in ~/Documents by following command?

$ find ~/Documents -type f | wc -l

And is there any symbolic link which makes a loop?

i.e. https://github.com/paulmillr/chokidar/blob/master/lib/fsevents-handler.js#L194

arielril commented 7 years ago

I executed the command and the result was 165810. I dont have any symbolic link in that folder, as far as I know.

arielril commented 7 years ago

Thanks for help :D