Skip to content
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

Handle E2BIG #10

Closed
zimbatm opened this issue Jan 18, 2021 · 0 comments
Closed

Handle E2BIG #10

zimbatm opened this issue Jan 18, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@zimbatm
Copy link
Member

zimbatm commented Jan 18, 2021

On POSIX systems, there is a limit to the number of files that can be passed as arguments. I thought that limit was 1024 arguments, and I was wrong. It's complicated. It seems like the limit is actually counted on the amount of memory it takes instead of the number of argument. Or both. Depending on the system.

Apparently, on Linux it's currently 2MB, which probably enough with the type of projects that treefmt will deal with. At that size, other constraints in terms of performance improvement would change the project's design anyway.

At some point we might want to calculate if we reach that limit, and invoke the formatter multiple times, splitting the number of files equally between invocations.

source:

@zimbatm zimbatm added the enhancement New feature or request label Jan 18, 2021
@zimbatm zimbatm added this to the Release 0.2 milestone Feb 27, 2021
@zimbatm zimbatm modified the milestones: Release 0.2, Release 0.3 Apr 10, 2021
@zimbatm zimbatm modified the milestones: Release 0.3, Release 0.4 May 7, 2021
brianmcgee added a commit that referenced this issue May 13, 2024
Closes #10

Signed-off-by: Brian McGee <[email protected]>

Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/15
Reviewed-by: Jonas Chevalier <[email protected]>
Co-authored-by: Brian McGee <[email protected]>
Co-committed-by: Brian McGee <[email protected]>
brianmcgee added a commit that referenced this issue May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant