Proposal: Increase buffer size for execSync call #39
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
I'm using code-complexity against a large monorepo at work and am running into
ENOBUFS
errors, even when usingsince
anduntil
flags for < 4 weeks.Some statistics about the monorepo: 6 years old, 120k commits, ~500k SLOC in TS, ~30k files currently on master.
The
until
flag was added as a kind of workaround for this issue in #29.I noticed the possibility to increase the buffer size via
execSync
options (defaults to 1MB; this PR proposes 32MB)A buffer size of 32MB is enough to fit the complete history into one
code-complexity
command (neithersince
orutil
flags are necessary).code-complexity
runs for ~13s on my M1 Mac.Was there any specific reason for you to avoid increasing the buffer size and opting for
until
instead?What do you think about increasing it?
Thank you for your work on code-complexity – it's a really nice tool! 💯 ❤️