Lentitud en Red
Moderator: Rathinagiri
- mjaviergutierrez
- Posts: 149
- Joined: Fri Nov 30, 2012 7:51 pm
- Location: San Lorenzo, Santa Fe, Argentina
Re: Lentitud en Red
Hola muchachos, retomando ...
Andrés, hice la prueba que me dijiste y te paso los resultados:
bueno, sin palabras, yo no sé que decir.....
Andrés, hice la prueba que me dijiste y te paso los resultados:
bueno, sin palabras, yo no sé que decir.....
...
- mjaviergutierrez
- Posts: 149
- Joined: Fri Nov 30, 2012 7:51 pm
- Location: San Lorenzo, Santa Fe, Argentina
Re: Lentitud en Red
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 )
*........................................................................................................................
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 )
...
Re: Lentitud en Red
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 ????
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.
Desde Guadalajara, Jalisco. México.
Re: Lentitud en Red
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
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
- mjaviergutierrez
- Posts: 149
- Joined: Fri Nov 30, 2012 7:51 pm
- Location: San Lorenzo, Santa Fe, Argentina
Re: Lentitud en Red
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
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
...
Re: Lentitud en Red
javier todo esta bien en la apertura, es raro la lentitud , lo unico diferentes es que uso indices cdx
saludos
saludos
- SALINETAS24
- Posts: 667
- Joined: Tue Feb 27, 2018 3:06 am
- DBs Used: DBF
- Contact:
Re: Lentitud en Red
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 ...
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
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no.
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Lentitud en Red
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
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
have fun
Jimmy
Jimmy
- dragancesu
- Posts: 925
- Joined: Mon Jun 24, 2013 11:53 am
- DBs Used: DBF, MySQL, Oracle
- Location: Subotica, Serbia
Re: Lentitud en Red
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
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
- AUGE_OHR
- Posts: 2065
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: Lentitud en Red
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
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.
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
so it is not GRID which is slow it is DBF which was not design for Network.
have fun
Jimmy
Jimmy