Skip to content

Please prevent from scanning hidden directories #327

Closed
arduino/arduino-cli
#366
@d-a-v

Description

@d-a-v

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/) ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions