Answer the question
In order to leave comments, you need to log in
How to correctly re-measure the directory traversal time?
I am doing a recursive traversal of directories, but there was such a problem that the program spends 14s of time on the first traversal, and 1s on subsequent traversals. Can I somehow make it so that the time is +/- stable?
I do a bypass through os.Walk
Answer the question
In order to leave comments, you need to log in
Rather, every time the measurement shows the correct results despite such a difference.
I think it's in the cache of data from the disk, due to caching, repeated bypasses work faster.
To be more precise, you need to see your code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question