arduino / arduino-builder

A command line tool for compiling Arduino sketches
GNU General Public License v2.0
458 stars 114 forks source link

Please prevent from scanning hidden directories #327

Closed d-a-v closed 5 years ago

d-a-v commented 5 years ago

Hi,

I have lots of git branches in my hardware .git/ directories (submodules too) and arduino-builder is now losing itself for too much time in them.

Details:

With -verbose -debug-level 10 the last message is

===debug ||| Ts: {0} - Running: {1} ||| [1561932660 WipeoutBuildPathIfBuildOptionsChanged]

I then analysed with linux strace what was happening and found that all time was spent scanning my .git/ directories in my hardware directory (I have lots of testing branches and not a very fast computer). Changing permissions of the git directories solved the issue:

find . -name .git -exec chmod 000 {} \;

Changing them back to 700 made the issue appear again.

FWIW, another dirty workaround is:

while true; do rm -f /tmp/*/build.options.json; sleep 1; done

Is it an acceptable generic (kind-)request to prevent from scanning all directories whose names are starting with a dot . (''hidden'' directories under unix) (or at least .git/) ?