Lentitud en Red

HMG en Español

Moderator: Rathinagiri

User avatar
mjaviergutierrez
Posts: 121
Joined: Fri Nov 30, 2012 7:51 pm
Location: San Lorenzo, Santa Fe, Argentina
Been thanked: 1 time

Re: Lentitud en Red

Post by mjaviergutierrez » Fri Feb 24, 2017 7:48 pm

Hola muchachos, retomando ...

Andrés, hice la prueba que me dijiste y te paso los resultados:
SERVER.jpg
SERVER.jpg (141.42 KiB) Viewed 1585 times
cliente.jpg
cliente.jpg (143.28 KiB) Viewed 1585 times
bueno, sin palabras, yo no sé que decir.....
...

User avatar
mjaviergutierrez
Posts: 121
Joined: Fri Nov 30, 2012 7:51 pm
Location: San Lorenzo, Santa Fe, Argentina
Been thanked: 1 time

Post by mjaviergutierrez » Fri Feb 24, 2017 7:54 pm

martingz, utilizo un rutina cuando inicio el sistema, y mantengo abiertas las todos tablas durante la ejecucion del mismo, obvio ne modo Shared, en cada proceso que termina dentro del sistema, llamo a la rutina y cierra y vuelve abrir las tablas con la intencion de descargar el buffer si es que quedó algo, esta rutina que manejas las tablas, a su vez lee una tablita que es la que contine el nombre de las tablas con sus indices y path, te la paso

*........................................................................................................................
Function Apertura( )

Local cFile :=""
Local cIndex:=""

Close DataBases

Use CONFIG New

Use TABLES New Shared
TABLES->( DBGOTOP( ) )

While TABLES->( .not. EOF( ) )

cFile :=""
cIndex:=""

cFile:=AllTrim( TABLES->SOURCE ) + AllTrim( TABLES->TABLE )

If File( cFile+".DBF" )

If TABLES->EXCLUSIVE
Use &cFile New Exclusive
Else
Use &cFile New Shared
EndIf

While AllTrim( TABLES->SOURCE ) + AllTrim( TABLES->TABLE ) == cFile .and.;
TABLES->( .not. EOF( ) )

If .not. Empty( AllTrim( TABLES->INDEX ) )

cIndex:=AllTrim( TABLES->SOURCE ) + AllTrim( TABLES->INDEX )

If File( cIndex )
Set Index To &cIndex ADDITIVE
Else
cClave:=TABLES->KEY
Index On &cClave To &cIndex ADDITIVE
EndIf

EndIf

TABLES->( DBSKIP( ) )

End While

Else

MsgBox("No se encuentran los archivos del sistema: "+ cFile )
Clos All
Release All
Quit

EndIf

End While

TABLES->( DBGOTOP( ) )

Return( Nil )
...

User avatar
andyglezl
Posts: 1191
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Has thanked: 37 times
Been thanked: 85 times
Contact:

Post by andyglezl » Fri Feb 24, 2017 9:36 pm

Javier
El error 64 se refiere a:

64 Network name deleted
http://cch4clipper.blogspot.mx/2009/01/ ... rrors.html

No se exactamente a que se refiera, pero al parecer por alguna razón se está borrando el
nombre de la red y ya no puede leer el indice ?????
Entonces, deduciendo, el problema es del ambiente de Windows y NO de programación...( ó algún virus)

En el Explorador si puedes entrar a la unidad Z: después del error ????
Andrés González López
Desde Guadalajara, Jalisco. México.

trmpluym
Posts: 248
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands
Has thanked: 6 times
Been thanked: 22 times

Post by trmpluym » Sat Feb 25, 2017 8:50 am

Javier,

The problem is in the grid control in combination with a DBF. I experienced the same problem over here:

viewtopic.php?f=5&t=5056

I switched back to a Browse control to fix my problem.

Theo

User avatar
mjaviergutierrez
Posts: 121
Joined: Fri Nov 30, 2012 7:51 pm
Location: San Lorenzo, Santa Fe, Argentina
Been thanked: 1 time

Post by mjaviergutierrez » Sat Feb 25, 2017 8:54 pm

Hola, Andres, si la unidad Z: sigue viva desde el explorador de windows, lo mas normal, veo las tablas, puedo copiar etc

trmpluym:
Hello, I had already seen that post, and also its resolution. I'll see what I do, if I continue using GRID or step to BROWSE, I have not tested with the BROWSE yet. Thanks and regards.

Estoy igual que al principio, voy aprovechar finde largo en mi país para hacer otras pruebas .... .Saludos a todos. Gracias
...

martingz
Posts: 280
Joined: Wed Nov 18, 2009 11:14 pm
Location: Mexico
Has thanked: 21 times
Been thanked: 15 times

Post by martingz » Sat Feb 25, 2017 9:56 pm

javier todo esta bien en la apertura, es raro la lentitud , lo unico diferentes es que uso indices cdx



saludos

User avatar
SALINETAS24
Posts: 360
Joined: Tue Feb 27, 2018 3:06 am
DBs Used: DBF
Has thanked: 27 times
Been thanked: 24 times

Post by SALINETAS24 » Mon Dec 02, 2019 7:53 pm

Hola mjaviergutierrez..,
una pregunta. ¿Resolviste el problema de la velocidad..?
En caso afirmativo ¿que solución aplicaste..?
yo por mi parte solo uso BROWSE para el manejo de Ficheros, obtengo mejores resultados. El GRID lo utilizo para tablas.
Un saludo ...
mjaviergutierrez wrote:
Sat Feb 25, 2017 8:54 pm
Hola, Andres, si la unidad Z: sigue viva desde el explorador de windows, lo mas normal, veo las tablas, puedo copiar etc

trmpluym:
Hello, I had already seen that post, and also its resolution. I'll see what I do, if I continue using GRID or step to BROWSE, I have not tested with the BROWSE yet. Thanks and regards.

Estoy igual que al principio, voy aprovechar finde largo en mi país para hacer otras pruebas .... .Saludos a todos. Gracias

User avatar
AUGE_OHR
Posts: 290
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 32 times
Been thanked: 39 times

Post by AUGE_OHR » Tue Dec 03, 2019 2:48 am

hi,

i guess we all speak about Windows 10 and there you have a lot of "Energie saving".

so a Network Card will default go "sleep" ... and will not awake fast when your App want to use it.
Workaround: "ping" Server every Minute or DISABLE "Energie saving" in Network Card.

p.s. i "think" there is a Powershell Command to Check if Netwerk Card can go "sleep" and DISABLE it

User avatar
dragancesu
Posts: 718
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 24 times
Been thanked: 151 times

Post by dragancesu » Tue Dec 03, 2019 8:42 am

When there is a lot of data it is time to change

DBF is OK locally, other rules on network

When there is a lot of data then one has to go for the better, in this case the database

MySQL works fine but it is not the only link in the program, the table with 20k rows reads in 0.6 sec and needs another 45 sec to be transferred to the grid

But this is a test, realistically the program does not need to show 1000+ rows, it will slow the user, always, every base, and what will so many rows on the screen, realistically see a 10-15, and he needs one, why show 100k +?

Oracle Forms have buffer about 300 records, when need more than load other, it's fine solution

User avatar
AUGE_OHR
Posts: 290
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 32 times
Been thanked: 39 times

Post by AUGE_OHR » Tue Dec 03, 2019 6:55 pm

hi,

i have search for LVN_ODCACHEHINT in HMG and Extendet but not found
https://docs.microsoft.com/en-us/window ... dcachehint

normal you transfer Resul-Set of a Query into Array but that need time.
but Listview can also "ask" for data "on-fly" ... this is what Explorer do

i have test this Code with Xbase++ using Ot4xb

Code: Select all

METHOD DXE_DBF2view:OnCACHEHINT(lp)
//
// this is need when load Data "on-fly" from SQL Table
//
// not need when use Array
//
LOCAL cText
LOCAL st
LOCAL i
LOCAL lAction := .F.

   st := NMLVCACHEHINT():New()
   st:_link_(lp,.F.)

   // cache the data pCacheHint->iFrom to pCacheHint->iTo ...
   //
   ::nFrom   := st:iFrom
   ::nTo     := st:iTo

   cText := "Cache from "+LTRIM(STR(::nFrom))+" to "+LTRIM(STR(::nTo))

   IF VALTYPE( ::Datalink  ) == "B"

      FOR i := ::nFrom TO ::nTo
         IF EMPTY(::aSource[i+1][1])
            lAction := .T.
         ENDIF
      NEXT

      IF lAction = .T.
         // can't call direct ::FillSource(::nFrom,::nTo)
         // while DBF are in Xbase++ Thread
         //
         // so we need Codeblock
         //
         ::lhold := .T.
         EVAL(::Datalink,::nFrom,::nTo,self)
      ENDIF
   ENDIF

RETURN self
this Code is ok but still does not work well with DBF ... access of DBF is too slow

so it is not GRID which is slow it is DBF which was not design for Network.

Post Reply