OT: network access speed

OT: network access speed

Postby Otto » Thu Jun 25, 2009 6: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: 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

 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6134
Joined: Fri Oct 07, 2005 7:07 pm

Re: OT: network access speed

Postby MarcoBoschi » Fri Jun 26, 2009 10:25 am

Otto,
Antivirus?
Marco
User avatar
MarcoBoschi
 
Posts: 1028
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: OT: network access speed

Postby James Bott » Fri Jun 26, 2009 11:27 pm

Otto,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: OT: network access speed

Postby James Bott » Fri Jun 26, 2009 11:44 pm

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
Last edited by James Bott on Sat Jun 27, 2009 12:24 pm, edited 1 time in total.
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: OT: network access speed

Postby nageswaragunupudi » Sat Jun 27, 2009 2: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
User avatar
nageswaragunupudi
 
Posts: 10330
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: OT: network access speed

Postby Otto » Sat Jun 27, 2009 7: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6134
Joined: Fri Oct 07, 2005 7:07 pm

Re: OT: network access speed

Postby anserkk » Sat Jun 27, 2009 7: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
User avatar
anserkk
 
Posts: 1331
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: OT: network access speed

Postby Otto » Sat Jun 27, 2009 9:19 pm

Hello Anser,
the delay I am experiencing against WINDOWS XP on the file server.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6134
Joined: Fri Oct 07, 2005 7:07 pm

Re: OT: network access speed

Postby MarcoBoschi » Sun Jun 28, 2009 4:34 pm

Otto,
I insist in asking if there is an antivirus installed.
Probably you did not read my post
Marco
User avatar
MarcoBoschi
 
Posts: 1028
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: OT: network access speed

Postby Otto » Sun Jun 28, 2009 5: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6134
Joined: Fri Oct 07, 2005 7:07 pm

Re: OT: network access speed

Postby Otto » Sun Jun 28, 2009 6: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6134
Joined: Fri Oct 07, 2005 7:07 pm

Re: OT: network access speed

Postby MarcoBoschi » Tue Jun 30, 2009 8:42 pm

Otto,
OK
Marco
User avatar
MarcoBoschi
 
Posts: 1028
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 135 guests