code-complexity
code-complexity copied to clipboard
Proposal: Increase buffer size for execSync call
I'm using code-complexity against a large monorepo at work and am running into ENOBUFS errors, even when using since and until 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 (neither since or util 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! 💯 ❤️