-
-
Notifications
You must be signed in to change notification settings - Fork 114
Don't scan hidden directories (.git, etc) #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When checking for updated core files, don't scan inside UNIX hidden directories like .git. Scanning inside a GIT tree for a large project with many branches could take many minutes of runtime and multiple GB of RAM. This was seen in the Arduino core for the ESP8266, but is probably also an issue for other core development teams. Fixes arduino#327 Signed-off-by: Earle F. Philhower, III <[email protected]>
Just did some proper, multi-run testing, and the PR is now properly filtering out .git from its scanning. Runtimes of 1:45 (on a 16-core Xeon server!) and memory usage of 4GB+ are now almost instantaneous and much, much lower RAM usage. |
Thanks alot @earlephilhower |
Sounds like a good change, but I have a few questions and remarks:
|
Good notes. I think I can clear up most of them in reverse order of difficulty. :)
@d-a-v and I are maintainers of https://github.com/esp8266/Arduino/ , so we use For normal users, though, your point is valid and they shouldn't have a The actual code change itself is called from the
The problem is any ignore list is only processed after the file list is in memory. It's not that there are some
You have a point, but I'm not sure it's a valid use case. I think it might be better to have a Alternatively, |
Port of arduino/arduino-builder#328 When checking for updated core files, don't scan inside UNIX hidden directories like .git. Scanning inside a GIT tree for a large project with many branches could take many minutes of runtime and multiple GB of RAM. This was seen in the Arduino core for the ESP8266, but is probably also an issue for other core development teams. Fixes arduino/arduino-builder#327 Signed-off-by: Earle F. Philhower, III <[email protected]>
Looks like this patch was implemented in the replacement arduino-cli: https://github.com/arduino/arduino-cli/blob/master/arduino/builder/sketch.go#L91 Closing since it's no longer relevant. |
When checking for updated core files, don't scan inside UNIX hidden
directories like .git. Scanning inside a GIT tree for a large project
with many branches could take many minutes of runtime and multiple GB of
RAM. This was seen in the Arduino core for the ESP8266, but is probably
also an issue for other core development teams.
Fixes #327
Signed-off-by: Earle F. Philhower, III [email protected]