Skip to content

ls: enter_directory should use an iterative loop instead of recursing #8725

@kimono-koans

Description

@kimono-koans

Rust doesn't have TCO and this uses more memory and risks a stack overflow. We should be dropping unused PathData when we are done with it.

In another PR, I've reduced the PathData size by more than a kilobyte, but master branch's version is a porker and these allocations are probably slowing down ls.

This is also the first step to concurrent directory search.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions