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

Size of directories is not calculated #306

Open
NightMachinery opened this issue May 12, 2020 · 8 comments
Open

Size of directories is not calculated #306

NightMachinery opened this issue May 12, 2020 · 8 comments

Comments

@NightMachinery
Copy link

image

@wyhaya
Copy link
Contributor

wyhaya commented Jun 29, 2020

I don't think this function should be added, this requires recursive directory to get file size and then merge.

it will be very slow.

@svenstaro
Copy link
Owner

Eh let's reopen it. It could be fast enough and it could also be cached. It should be opt-in though for sure so that the host can't be DOSed by default.

@wyhaya
Copy link
Contributor

wyhaya commented Jun 29, 2020

@svenstaro If you encounter a directory like node_modules, there may be 10,000-100,000... files, is there any good way?

@svenstaro
Copy link
Owner

Yeah, how about setting a useful timeout per directory?

@wyhaya
Copy link
Contributor

wyhaya commented Jun 29, 2020

I think timeout is not good. If it cannot be calculated quickly, it will time out every time, which means that the server can never calculate the size of some folders. The timeout should be set on some unstable functions, such as network packets.

@NightMachinery
Copy link
Author

The timeout can be cached as “-1”. Or “NA.” I personally don’t have that many files.

@ssokolow
Copy link

How about how KDE's Dolphin file manager does it, where, instead of file sizes, it's a count of files/directories inside each folder?

Screenshot_20200731_094943

Then the timeout could display something like "More than ____ items".

@zamu-flowerpot
Copy link

I came here to mention KDE's file count and glad it was already been mentioned.

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

No branches or pull requests

5 participants