summary: listing directory with tons of files is slow --> Listing directory with tons of files is slow
Description has changed:
Diff:
--- old+++ new@@ -1 +1 @@-directory with 1000+ files open in minutes in gentoo...+A directory with 1000+ files takes sevaral minutes to open in gentoo.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems it's the identification of the file types for your files that is taking too long.
I assume the files lack a simple (filename-based) type rule, i.e. they're not all named something that ends in ".txt"?
The fact that gentoo has resorted to running the external "file" command to identify the files' types is very telling; you want to avoid that in general since it's much slower than the built-in rules.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! Thanks for reporting. Can you please provide some more detail?
Like:
These are all things that can greatly affect what causes the slowdown and thus make it easier to hunt down. Thanks.
If it helps, I can recompile gentoo with some debug options (my distro is gentoo) and send you logs. Just tell me.
BTW. during listing of directory 'file' process took 100% of one of my CPU's core (for about 2 min), so 50% in total
Diff:
Hi!
It seems it's the identification of the file types for your files that is taking too long.
I assume the files lack a simple (filename-based) type rule, i.e. they're not all named something that ends in ".txt"?
The fact that gentoo has resorted to running the external "file" command to identify the files' types is very telling; you want to avoid that in general since it's much slower than the built-in rules.