I’m using a DirectoryContentList with a TimeSliceThread to scan lots of files (up to 50k) on a network drive.
I don’t use File::findChildFiles() because I need to start reading the first ones while the thread continues to dig for files.
However DirectoryContentList is slow because it spends most of its time getting additional informations (size, modification time, write access) I don’t need.
When I remove the following lines in juce_DirectoryContentsList.cpp, it goes something like 10 times faster.

info->fileSize = file.getSize(); info->modificationTime = file.getLastModificationTime(); info->creationTime = file.getCreationTime(); info->isDirectory = isDir; info->isReadOnly = ! file.hasWriteAccess();

I could rewrite a DirectoryContentList class just for my needs, but I can’t access the functions like juce_findFileStart, juce_findFileNext, etc…

Any solution ?


There’s been another thread about this recently, and I’ve re-written it all so that it’s more efficient - it’ll be able to get all the info without any extra overhead.

Too many changes to post the code here, but will be in the next release.