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

Add an option to build non-recursive reports for large directories #3

Open
BertrandAlexandre opened this issue Dec 8, 2022 · 3 comments

Comments

@BertrandAlexandre
Copy link

As specified in the README, scanning directories with many files can take a long time and leads to a large report.
However, scanning a large directory or a full disk can be very interesting.
Maybe an option to build non-recursive reports could be interesting.
This would be a report with top-level files and folders only.

@GaelGirodon
Copy link
Owner

Why not but you'd only get a lighter report, not a faster scan. Even to get the size of top-level files and folders only, you need to walk through the whole file hierarchy as the size of a folder is computed by summing the size of all of its children, recursively. Would it be really relevant to add an option that still leads to a full scan but outputs a partial report?

@BertrandAlexandre
Copy link
Author

Objective is indeed to reduce the size of both report files. Analyzes can run as background tasks so I think it's not a problem.
For large amount of files, html report may take several minutes to open.

@GaelGirodon
Copy link
Owner

I get the point, but that means you'll run a full scan and just throw away 99% of collected data in the output report just to make it lighter 😕 And if top-level results are finally not enough to decide what to cleanup, you'll have to re-run the full scan with a different depth parameter.
From your experience using dirstat, could you tell me from which report size / number of files the HTML report becomes too big to be opened in a reasonable amount of time? A 12 MB report (~35k files) only takes a couple of seconds to open, but I never tried to scan folders big enough to produce a report that couldn't be opened in less than 20-30 seconds.

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

2 participants