Page 1 of 1

[5.00b2] Lof is ultra slow on Windows 8 on shared folder

Posted: Sun Sep 16, 2012 12:21 pm
by codeprof
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?

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
Thanks in advance

Re: [5.00b2] Lof is ultra slow on Windows 8 on shared folder

Posted: Sun Sep 16, 2012 2:53 pm
by IdeasVacuum
I could be completely wrong but I thought I read somewhere that Microsoft Security Essentials is built-in to Windows 8. If that is true, that's where the problem will be - the app will need to be put on the "safe list". PB needs to be added too: http://www.purebasic.fr/english/viewtop ... 12&t=50201

Re: [5.00b2] Lof is ultra slow on Windows 8 on shared folder

Posted: Tue Oct 02, 2012 12:24 pm
by Fred
PB uses the regular API to get the file length, so it's probably a problem somewhere else.

Re: [5.00b2] Lof is ultra slow on Windows 8 on shared folder

Posted: Tue Oct 02, 2012 12:40 pm
by rsts
Unable to reproduce these results on my windows 8 system.

There are quite a few variables involved.

cheers