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

performance in windows of lfs.attributes inside lfs.dir loop #153

Open
sonoro1234 opened this issue Nov 16, 2021 · 0 comments
Open

performance in windows of lfs.attributes inside lfs.dir loop #153

sonoro1234 opened this issue Nov 16, 2021 · 0 comments

Comments

@sonoro1234
Copy link

sonoro1234 commented Nov 16, 2021

on https://github.com/sonoro1234/luafilesystem/ I did a performance comparision on windows between calling lfs.attibutes inside lfs.dir loop and a modified version of lfs.dir which returns file name but also a dir.entry which can be queried for file size and file mode. The performance increase was huge. (It was tested running a test that will recurse subdirectories from a hight level directory and was much slower in windows than in linux)

The change from https://github.com/sonoro1234/luafilesystem/ branch unicode is in commit sonoro1234/luafilesystem@ba39e41

The problem is that it breaks compability with https://github.com/keplerproject/luafilesystem

But the only breaking is that lfs.dir returns as always on linux/osx but on windows it returns the file name and also an object that can be queried for getting attributes. So that old use pattern is still possible but on windows you can also use the object if you need to increase performance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant