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

Optimize directory reading in kernel #164

Closed
mfld-fr opened this issue Oct 30, 2017 · 2 comments
Closed

Optimize directory reading in kernel #164

mfld-fr opened this issue Oct 30, 2017 · 2 comments
Assignees
Labels
done Improvement done improvement Product improvement

Comments

@mfld-fr
Copy link
Contributor

mfld-fr commented Oct 30, 2017

The readdir fonction of the filesystem is called twice : the first entry is retained, but the second one is wasted, as the filldir callback buffer has only one entry. Add a maximum count as a new parameter to speed up directory listing, or simplify the whole.

@mfld-fr
Copy link
Contributor Author

mfld-fr commented Nov 5, 2017

According to the readdir(2) man page, there is no need to iterate in the readdir operation of a directory inode, as only one dentry is to be returned. So the simplest optimization is to simplify readdir in each filesystem: minix_readdir, msdos_readdir and romfs_readdir.

mfld-fr referenced this issue in mfld-fr/elks Nov 12, 2017
@mfld-fr
Copy link
Contributor Author

mfld-fr commented Nov 12, 2017

Done for romfs_readdir in commit 655eaaf.

mfld-fr added a commit to mfld-fr/elks that referenced this issue Apr 16, 2018
Issue ghaerr#164

- Remove unused vfat dir
- Simplify msdos_readdir code
mfld-fr added a commit to mfld-fr/elks that referenced this issue Apr 16, 2018
@mfld-fr mfld-fr added improvement Product improvement done Improvement done labels Apr 18, 2018
@mfld-fr mfld-fr self-assigned this Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Improvement done improvement Product improvement
Projects
None yet
Development

No branches or pull requests

1 participant