[5.00b2] Lof is ultra slow on Windows 8 on shared folder
Posted: Sun Sep 16, 2012 12:21 pm
Lof() is very slow if I open a file from a shared folder, but just on Windows 8. Maybe it's a bug of Windows.
Would it be possible to cache the length?
Thanks in advance
Would it be possible to cache the length?
Code: Select all
;Create a EXE out of the PB-Code and put it in a shared folder under Windows 8
; just create a dummy file (has nothing to do with the bug)
CreateFile(1, "test.dat")
WriteByte(1, 0)
CloseFile(1)
ReadFile(1,"test.dat")
start = ElapsedMilliseconds()
For i = 0 To 10 * 1024
sz = Lof(1)
Next
MessageRequester("","needed time: " +Str(ElapsedMilliseconds() - start))
CloseFile(1)
; Windows 8 normal directory: 16 ms
; Windows 8 shared directory: 7500 ms <-- this is strange
; Windows 7 normal directory: 16 ms
; Windows 7 shared directory: 16 ms