Page 1 of 1

OT: network access speed

PostPosted: Thu Jun 25, 2009 6:13 pm
by Otto
I developed a app where I check for the existence of a xxxt.ldb file.
If the file is there the depending xxx.dbf is locked otherwise free.
(a kind of filelocking - necessary because FWPPC and FWH work on the same files).

Now I started to test on the hardware where this app (ECR) software
should work on. The files are on a network.

This is my code I tested with file() and also Directory().
But it takes at least 4 sec. till file() or directory() function notice that the file is deleted.

On my develop machine or with the PPC – Symbol - where I use the same code for testing the existence of the file - this takes milli seconds.

On the ECR there is a Windows CE embedded installed.
Does someone have an idea how to speed up the response time?
Thanks in advance
Otto

Code: Select all  Expand view
do while .t.
   //HB_GCAll( .T. )
   //sysrefresh()
   //HB_IdleState()

   //if file( ::oApp:dbfTisch +  ".ldb" ) = .t.
   aTisch := Directory( ::oApp:dbfTisch +  ".ldb" )  
   if len(aTisch) > 0
      nVersuche := nVersuche + 1
      MsgWait("Tisch gesperrt","Versuch Nr: " + str(nVersuche),1)
      if nVersuche > 10
         if MsgYesNo( "Tisch gesperrt - Abbruch" ) = .t.
            exit
         endif
      endif
   else
      exit
   endif
enddo

 

Re: OT: network access speed

PostPosted: Fri Jun 26, 2009 10:25 am
by MarcoBoschi
Otto,
Antivirus?
Marco

Re: OT: network access speed

PostPosted: Fri Jun 26, 2009 11:27 pm
by James Bott
Otto,

Have you tried just using fopen() and checking for an error?

James

Re: OT: network access speed

PostPosted: Fri Jun 26, 2009 11:44 pm
by James Bott
Otto,

Try something like this:

Code: Select all  Expand view
#include "Fileio.ch"

function isFile( cFile )
   local lSuccess:=.t., nHandle:=0
   nHandle := FOPEN( cFile, FO_READWRITE + FO_SHARED)
   IF FERROR() != 0
      lSuccess:= .f.
      //? "Cannot open file, DOS error ", FERROR()
      BREAK
   ELSE
      FCLOSE()
   ENDIF
return lSuccess


James

Re: OT: network access speed

PostPosted: Sat Jun 27, 2009 2:51 am
by nageswaragunupudi
Mr Otto

The ultimate purpose is to know if the xxx.dbf is locked or free. Something like checking DbrLock( nRec ) is true or false of any semaphore table is much faster than checking for existence of a file. You may check the performance of this suggestion and if you find it faster you may modify your checking routines accordingly.

Re: OT: network access speed

PostPosted: Sat Jun 27, 2009 7:12 am
by Otto
Hello James, hello Mr. NageswaraRao,

After I have tested many different PC as file SERVERS (all XP) I tested my old WINDOWS 2000 SERVER as file server.
On this all is working within milliseconds.
I will do now some test against a VISTA Server.
Best regards,
Otto

Re: OT: network access speed

PostPosted: Sat Jun 27, 2009 7:23 am
by anserkk
Dear Mr.Otto,

What is the server OS used ? Is it Win 2003 Server ? (The server on which you are experiencing the delay). After reading the posts in this thread, I understand that you are using it as a file server and not as a domain controller and all PC's in the network are assumed to be in the same workgroup. Am I right ?

Regards

Anser

Re: OT: network access speed

PostPosted: Sat Jun 27, 2009 9:19 pm
by Otto
Hello Anser,
the delay I am experiencing against WINDOWS XP on the file server.
Best regards,
Otto

Re: OT: network access speed

PostPosted: Sun Jun 28, 2009 4:34 pm
by MarcoBoschi
Otto,
I insist in asking if there is an antivirus installed.
Probably you did not read my post
Marco

Re: OT: network access speed

PostPosted: Sun Jun 28, 2009 5:16 pm
by Otto
Marco, I tested with and without antivirus with the same results.
I have at the moment two exactly the same new Touch PC in the office.
I will install tomorrow for testing purpose WINDOWS 2000 and XP.
I will report the results.
Best regards,
Otto

Re: OT: network access speed

PostPosted: Sun Jun 28, 2009 6:02 pm
by Otto
I did some more tests:
Same hardware but instead of XP WINDOWS VISTA
All is working excellent.
So my problem is XP as a file server OS.

Best regards,
Otto

Re: OT: network access speed

PostPosted: Tue Jun 30, 2009 8:42 pm
by MarcoBoschi
Otto,
OK
Marco