Hi
LazUtils, unit FileUtil has function FindAllDirectories.
It uses the same idea as FindAllFiles, using TFileSearcher internally. Now only it overrides the DoDirectoryFound method.
I realized it must be slow. TFileSearcher searches also all files which it useless if you only want directories.
I am not using the function so this is not "my itch" and I am not planning to fix it now. I have other itches to scratch.
If someone else wants to fix it, I will happily apply the patch. It is a simple and confined task, not many dependencies like in the IDE's code. It can be very rewarding (if you like to optimize code) as the speedup will be significant.
Ideas can be taken from my r39299 in Lazarus trunk in which I implemented a thread to scan and search for FPC sources, or then just by improvising.
Juha