Skip to content

Handle E2BIG #10

@zimbatm

Description

@zimbatm

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions