fsspec / fsspec/filesystem_spec

memory ls/walk/find algorithms

Open
#1,906 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.4k
Forks
490
Avg merge
2d 3h
Merged PRs (30d)
38

Description

I was wondering if anyone had considered using a tree-based structure rather than flat structure for the in-memory implementation. For my current experimentation, use case I'm ending up with A LOT of calls to ls via walk and find calls, and that calls startswith very many times when many paths are stored in the flat structuring.

For me the in-memory implementation as it stands is not useable for when you have a significant number of paths. I guess maybe the in-memory implementation is intended more for testing, and less for production?

Any value in pursing an update to the in-memory implementation? Any workarounds or better approaches? I have considered fuse but it's not a cross platform dependency.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the in-memory implementation and its ls, walk, and find entry points, then measure the repeated startswith work described for large path sets. The issue does not define a proposed structure, workaround, benchmark, or acceptance criteria, so the intended result would need to be clarified before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.