09 Mar 2018 16:47
Old setting: pentium 4 with 2gb memory, windows 7, 10 mb/s upload internet connection
New setting: Virtual cloud server, 4gb memory, dual processor, 270! mb/s upload internet connection
Same software, same dbf's and same letodbf.
Time spent on the old setting to open and traverse 7 dbf's: 26 secs
Time spent on the new setting to open and traverse same 7 dbf's: 205 secs
The only change between the 2 situations is the real pc for a virtual pc with higher performance.
Next step in my job is to learn linux in order to install a linux server w/samba, letodbf and dbf´s, and throw the f****ing windows through the window.
Thanks a lot
30 Mar 2018 11:20
USE ( cServidorDB + "test1" ) New
TEST1->(OrdListClear())
FOR I:=1 TO test1->(OrdCount())
? test1->(OrdName(i))
? test1->(OrdKey(i))
? test1->(OrdFor(i))
inkey(0)
NEXT
INDEX ON DESCRI TAG IND02 TEMPORARY ADDITIVE
COMMIT
FOR I:=1 TO test1->(OrdCount())
? test1->(OrdName(i))
? test1->(OrdKey(i))
? test1->(OrdFor(i))
inkey(0)
NEXT
30 Mar 2018 13:03
30 Mar 2018 13:05
30 Mar 2018 13:14
#include "hbgtinfo.ch"
#include "inkey.ch"
FUNCTION Main()
hb_ThreadStart( { || tela1() } )
hb_ThreadStart( { || tela2() } )
hb_ThreadStart( { || tela3() } )
hb_ThreadWaitForAll()
RETURN NIL
FUNCTION Tela1()
LOCAL mTela1 := Space(10), GetList := {}
hb_gtReload( "WVG" )
SetMode( 35, 85 )
CLS
Statusbar2()
@ 1, 0 SAY "Tela1" GET mTela1
READ
? "A" / 2
RETURN NIL
FUNCTION Tela2()
LOCAL mTela2 := Space(10), GetList := {}
hb_gtReload( "WVG" )
SetMode( 30, 80 )
CLS
Statusbar2()
@ 1, 0 SAY "Tela2" GET mTela2
READ
? "A" / 2
RETURN NIL
FUNCTION Tela3()
LOCAL mTela3 := Space(10), GetList := {}
hb_gtReload( "WVG" )
SetMode( 25, 75 )
CLS
Statusbar2()
@ 1, 0 SAY "Tela3" GET mTela3
READ
? "A" / 2
RETURN NIL
STATIC FUNCTION Statusbar2()
LOCAL oThisButton
oThisButton := wvgTstText():New()
oThisButton:cText := "Teste usando tstText"
oThisButton:Create( ,, { -MaxRow(), 0 }, { -1, -(MaxCol()+1) } )
RETURN NIL
30 Mar 2018 13:15
FUNCTION UDF_Trans( cTo )
/*
* UDF_Trans copy all records from current area to area with <cTo> client alias
with conversion between numeric and character fields.
*/
LOCAL cArea := Alias()
LOCAL cAliasTo := leto_Alias( cTo )
LOCAL lSetDel
LOCAL lRes := .T., oError
dbSelectArea( cArea )
IF ! Empty( cAliasTo )
lSetDel := Set( _SET_DELETED, .f. )
BEGIN SEQUENCE WITH { | e | break( e ) }
OrdSetFocus( 0 )
GO TOP
WHILE ! eof()
UDF_TransRec( cAliasTo )
SKIP
ENDDO
(cAliasTo)->(dbCommit())
RECOVER
WUsLog( "UDF_Trans error: " + cArea + "-->" + cTo + " " +;
oError:description + if( ! Empty( oError:operation ), ":" + oError:operation, "" ) +;
" recno " + LTrim(Str(RecNo())))
lRes := .F.
END SEQUENCE
Set( _SET_DELETED, lSetDel )
ENDIF
RETURN lRes
FUNCTION UDF_Backup( cArquivo, cPasta, cRotina )
LOCAL lErro:=.F.
hb_Default( @cRotina, "" )
hb_Default( @cArquivo, "" )
hb_Default( @cPasta, "C:\BACKUP" + [\] + ;
cRotina + "_DB_ " + ;
hb_DTOC( Date(), "YYYY_MM_DD") + ;
"-" + Left( StrTran( Time(), ":" ), 4 ) )
//WUsLog("1")
BEGIN SEQUENCE //WITH { | e | break( e ) } // se descomentar da erro ?????
//WUsLog(cPasta)
IF ! hb_DirExists( cPasta )
WUsLog("2")
IF hb_DirCreate( cPasta ) != 0
//WUsLog("3")
cPasta := "C:\BACKUP" + [\] + ;
cRotina + "_DB_" + ;
StrTran( hb_TTOC( hb_DateTime(), 'YYYY_MM_DD', 'HHMM' ), ' ', '_' )
IF hb_DirCreate( cPasta ) != 0
BREAK
ENDIF
ENDIF
ENDIF
Copy_Arq( "DB" + [\] + cArquivo, cPasta, .T. )
//WUsLog("3")
RECOVER
//WUsLog( "UDF_error: " + " " + oError:description + if( ! Empty( oError:operation ), ":" + oError:operation, "" ) )
lErro:=.T.
END SEQUENCE
RETURN lErro
30 Mar 2018 13:55
05 Abr 2018 11:19
05 Abr 2018 11:50