nielsbasjes commented on PR #167:
URL: https://github.com/apache/creadur-rat/pull/167#issuecomment-1826730817
I have not measured for any performance impact yet.
I suspect filtering the files is a bit slower because:
- It will check all provided gitignore rules and not stop at the first match
(which is part of the fix that is needed).
- It will walk through the filetree searching for .gitignore files.
- So it goes over the tree an additional time. I suspect this is the bit
that may impact large projects and can be improved (see below).
- In general more gitignore files will be found that will slow the
matching itself even further (which is part of the fix that is needed).
Because all .gitignore files only apply to the directory they are in it is
possible to combine the two walks over the file tree. That would however mean a
complete architecture change which you are already considering.
Something like: Recursively: In each directory; first load any local ignore
files; do the rest; on return discard these local ignore rules again and
continue.
Looking at this as a whole: This plugin will read all not ignored files.
Spending a few ms more on ignoring more files should as a whole speed things up
because actually reading a file and analyzing the content takes a lot more time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]