FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour OT: network access speed
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
OT: network access speed
Posted: Thu Jun 25, 2009 06:13 PM
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 (fw): Select all Collapse
do while .t.
   //HB_GCAll( .T. )
   //sysrefresh()
   //HB_IdleState() 

   //if file( ::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
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: OT: network access speed
Posted: Fri Jun 26, 2009 10:25 AM

Otto,
Antivirus?
Marco

Marco Boschi
info@marcoboschi.it
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: OT: network access speed
Posted: Fri Jun 26, 2009 11:27 PM

Otto,

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: OT: network access speed
Posted: Fri Jun 26, 2009 11:44 PM
Otto,

Try something like this:

Code (fw): Select all Collapse
#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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: OT: network access speed
Posted: Sat Jun 27, 2009 02:51 AM

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.

Regards



G. N. Rao.

Hyderabad, India
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: OT: network access speed
Posted: Sat Jun 27, 2009 07:12 AM

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

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: OT: network access speed
Posted: Sat Jun 27, 2009 07:23 AM

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

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: OT: network access speed
Posted: Sat Jun 27, 2009 09:19 PM

Hello Anser,
the delay I am experiencing against WINDOWS XP on the file server.
Best regards,
Otto

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: OT: network access speed
Posted: Sun Jun 28, 2009 04:34 PM

Otto,
I insist in asking if there is an antivirus installed.
Probably you did not read my post
Marco

Marco Boschi
info@marcoboschi.it
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: OT: network access speed
Posted: Sun Jun 28, 2009 05:16 PM

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

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: OT: network access speed
Posted: Sun Jun 28, 2009 06:02 PM

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

Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: OT: network access speed
Posted: Tue Jun 30, 2009 08:42 PM

Otto,
OK
Marco

Marco Boschi
info@marcoboschi.it

Continue the discussion