I just found a weird behaviour with the Directory Iterator on my PC.
I scan big directories with a "*.wav" wildcard. The time taken to do this scan can change a lot. It usually takes around 3 seconds, but sometimes it takes up to 60 seconds, for the same result.
How can it sometimes take that long ?
My directory iterator is a local object, in an independant thread.
After some research, I found out that the next() instruction of the directory iterator object can sometimes take very long when the file is far away from the previous one in the file tree.
Any idea ?