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

Windows specific forum
codeprof
User
User
Posts: 65
Joined: Sun Sep 16, 2012 12:13 pm

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

Post 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
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

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

Post 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
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Fred
Administrator
Administrator
Posts: 18360
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

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

Post by Fred »

PB uses the regular API to get the file length, so it's probably a problem somewhere else.
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

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

Post by rsts »

Unable to reproduce these results on my windows 8 system.

There are quite a few variables involved.

cheers
Post Reply