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

Improve iteration capability #32

Open
sosthene-nitrokey opened this issue Mar 10, 2023 · 1 comment · May be fixed by #33
Open

Improve iteration capability #32

sosthene-nitrokey opened this issue Mar 10, 2023 · 1 comment · May be fixed by #33

Comments

@sosthene-nitrokey
Copy link
Contributor

sosthene-nitrokey commented Mar 10, 2023

Iteration over a directory is not very efficient, as it can't be safely paused and resumed.
This leads to issues. For example in trussed, as a consequence the iteration happens at a speed of $O(n^2)$ because of this: https://github.com/trussed-dev/trussed/blob/main/src/store/filestore.rs#L335

The raw c API exposes a lfs_dir_tell, which littlefs can use to "store" the current iteration position and return to using lfs_dir_seek

@sosthene-nitrokey
Copy link
Contributor Author

Trying to implement it lead to discovering a bug in littelfs: littlefs-project/littlefs#785

@sosthene-nitrokey sosthene-nitrokey linked a pull request Mar 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant