TSBrowse and network (again)
TSBrowse and network (again)
Hi All,
I know this issue was discussed before, but about TXBrowse using medium or large dbfs over a lan, but I`m facing a trouble with TSbrowse, but in a wireless lan. When my app tries to open a small-to-medium dbf in a LAN with cables, it opens normally, but here we have now a complete wireless lan and I noticed a very very slow traffic. It makes a dbf (in this app) to browse the records in almost 2 minutes... (and the dbf has just 2600 records). I use TSBrowse because of all the features it has and specially in this app I use cell edition, searching, and many other things. I know that TWBrowse is the fastest browse, but it does not have all the features I need and I found in TSbrowse. What do you say about it? What are your opinions?
Regards,
I know this issue was discussed before, but about TXBrowse using medium or large dbfs over a lan, but I`m facing a trouble with TSbrowse, but in a wireless lan. When my app tries to open a small-to-medium dbf in a LAN with cables, it opens normally, but here we have now a complete wireless lan and I noticed a very very slow traffic. It makes a dbf (in this app) to browse the records in almost 2 minutes... (and the dbf has just 2600 records). I use TSBrowse because of all the features it has and specially in this app I use cell edition, searching, and many other things. I know that TWBrowse is the fastest browse, but it does not have all the features I need and I found in TSbrowse. What do you say about it? What are your opinions?
Regards,
Kleyber Derick
FWH / xHb / xDevStudio / SQLLIB
FWH / xHb / xDevStudio / SQLLIB
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: TSBrowse and network (again)
Hi Kleyber:Kleyber wrote:I know this issue was discussed before, but about TXBrowse using medium or large dbfs over a lan, but I`m facing a trouble with TSbrowse, but in a wireless lan. When my app tries to open a small-to-medium dbf in a LAN with cables, it opens normally, but here we have now a complete wireless lan and I noticed a very very slow traffic. It makes a dbf (in this app) to browse the records in almost 2 minutes... (and the dbf has just 2600 records). I use TSBrowse because of all the features it has and specially in this app I use cell edition, searching, and many other things. I know that TWBrowse is the fastest browse, but it does not have all the features I need and I found in TSbrowse. What do you say about it? What are your opinions?
You should check the access point conections, in a normal wireless speed (54 mbps) the performance should be more or less 50 % against a 100 mbps lan.
I'm working right now in a remote wireless conection and I'm browsing a 226000 records dbf with a reasonably comfortable speed.
Please give me your email to send you a program for testing.
Regards.
Manuel Mercado.
James,
Manuel,
Best Regards,
No, in fact I never use SET FILTER. In this case, I open 7 dbfs and their indexes and I open the browse with just one of them. Remember that I `m using the version 6.13 modified by you. (A GREAT work!)I don't think this is a browse issue. Are you filtering the database using SET FILTER?
Manuel,
You are right. That was the first aspect I was considering. The speed decreases to a 50% in a wireless lan, but I am anxious for your test. You can email me at kleyber.ribeiro@grupoferraz.com.brYou should check the access point conections, in a normal wireless speed (54 mbps) the performance should be more or less 50 % against a 100 mbps lan.
I'm working right now in a remote wireless conection and I'm browsing a 226000 records dbf with a reasonably comfortable speed.
Please give me your email to send you a program for testing.
Best Regards,
Kleyber Derick
FWH / xHb / xDevStudio / SQLLIB
FWH / xHb / xDevStudio / SQLLIB
Files on network
Kleyber,
I use the same TSBrowse ... and James and I have discussed speed quite a lot.
I have no problem with speed issues when using Advantage Database Server. However, in LOCAL SERVER mode, it can be slow.
I have place where this is very apparent. I open 6 databases, but that means I'm also opening CDX and FPT files, so that is about 15 files total. I do filter 5 of those also, so that will slow things down quite a bit.
When you think about it, that is a lot of data to move across the network since the processing takes place locally. It was faster with xbrowse but I also like the additional features in TSBrowse.
My clients had to invest in ADS ... which actually makes me happy because it makes for less chance of errors.
Tim
I use the same TSBrowse ... and James and I have discussed speed quite a lot.
I have no problem with speed issues when using Advantage Database Server. However, in LOCAL SERVER mode, it can be slow.
I have place where this is very apparent. I open 6 databases, but that means I'm also opening CDX and FPT files, so that is about 15 files total. I do filter 5 of those also, so that will slow things down quite a bit.
When you think about it, that is a lot of data to move across the network since the processing takes place locally. It was faster with xbrowse but I also like the additional features in TSBrowse.
My clients had to invest in ADS ... which actually makes me happy because it makes for less chance of errors.
Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
Tim and all,
I have no way to use ADS, but I`ve discovered some things were generating an additional slowness in the app.. In the beginning it has a DbEval() in order to show the result in the footers, which logically in a lan or a wireless lan put the app slow before the browse appears. After quiting it, it becomes faster, but not too much. I`ve tried the app from Manuel Mercado and it runs fast... very nice. Maybe I have to try the new tsbrowse version to see how it works.
Thanks a lot
I have no way to use ADS, but I`ve discovered some things were generating an additional slowness in the app.. In the beginning it has a DbEval() in order to show the result in the footers, which logically in a lan or a wireless lan put the app slow before the browse appears. After quiting it, it becomes faster, but not too much. I`ve tried the app from Manuel Mercado and it runs fast... very nice. Maybe I have to try the new tsbrowse version to see how it works.
Thanks a lot
Kleyber Derick
FWH / xHb / xDevStudio / SQLLIB
FWH / xHb / xDevStudio / SQLLIB
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Kleyber,
Also, I still think there is something else in your code causing the slow browse refresh. Can we see the code where the problem is?
Have you tried creating a small (as simple as possible) sample program to see if you can recreate the problem?
James
As expected. DBEval() is sending the entire 2500 records across the network. You should consider only showing the totals on-demand rather than by default. Perhaps users don't need to see them all the time.The dbf has 2500 records, but even with so little records was very slow.
Also, I still think there is something else in your code causing the slow browse refresh. Can we see the code where the problem is?
Have you tried creating a small (as simple as possible) sample program to see if you can recreate the problem?
James
James,
Sure! Here it is:Also, I still think there is something else in your code causing the slow browse refresh. Can we see the code where the problem is?
Code: Select all
*****************************************************************************
Function CadDup()
// Lançamentos no Contas a Pagar
*****************************************************************************
local oDlgAna, oBrw, nTotal:=0, nTotalPago:=0, nOpc:=1 //, dData1:=ctod(space(8)), dData2:=ctod(space(8))
private dData1:=ctod(space(8)), dData2:=ctod(space(8))
use tabfil alias FIL index tabfil shared new
use tabcpi alias CPI index tabcpi shared new
use tabpco alias PCO index tabpco shared new
use tabpsb alias PSB index tabpsb shared new
use tabban alias BAN index tabban shared new
use tabcai alias CAI index tabcai shared new
use tabved alias VED index tabved shared new
DEFINE DIALOG oDlgAna RESOURCE "CONTAS"
REDEFINE BITMAP RESOURCE "BARRA" ID 60 OF oDlgAna
sele CPI
set order to 8
set relation to loja into FIL
DbGoBottom()
REDEFINE RADIO oOpc VAR nOpc ID 64,65 OF oDlgAna UPDATE
REDEFINE VGET oData1 VAR dData1 ID 66 OF oDlgAna UPDATE CALENDARIO WHEN nOpc = 2
REDEFINE VGET oData2 VAR dData2 ID 67 OF oDlgAna UPDATE CALENDARIO WHEN nOpc = 2
REDEFINE BUTTON oBmpGer ID 70 OF oDlgAna PROMPT "&Gerar" ACTION (Verifica_Opcao(@nOpc,@dData1,@dData2,oBrw,@nTotal,@nTotalPago),oBrw:SetFocus(),oBrw:UpStable(),oBrw:Refresh())
REDEFINE BROWSE oBrw ALIAS "CPI" CELLED ID 61 OF oDlgAna
ADD COLUMN TO oBrw TITLE "C.Custo" ;
DATA FieldWBlock( "ccusto", Select( "CPI" ) ) ;
SIZE 55 ;
VALID { |uVar| Busca_Codigo( uVar, oBrw ) } ;
POSTEDIT { || Pesquisa_Codigo() } ;
ALIGN DT_LEFT ;
EDITABLE MOVE DT_MOVE_NEXT
ADD COLUMN TO oBrw TITLE "Filial" ;
DATA FieldWBlock( "loja", Select( "CPI" ) ) ;
SIZE 55 ;
VALID { |uVar| Busca_Fil( uVar, oBrw ) } ;
ALIGN DT_LEFT ;
EDITABLE MOVE DT_MOVE_NEXT
ADD COLUMN TO oBrw TITLE "No. Título" ;
DATA FieldWBlock( "dupli", Select( "CPI" ) ) ;
SIZE 79 ;
ALIGN DT_LEFT ;
EDITABLE MOVE DT_MOVE_NEXT
ADD COLUMN TO oBrw TITLE "Histórico" ;
DATA FieldWBlock( "historico", Select( "CPI" ) ) ;
SIZE 240 ;
ALIGN DT_LEFT ;
EDITABLE MOVE DT_MOVE_NEXT
ADD COLUMN TO oBrw TITLE "Vencimento" ;
DATA FieldWBlock( "venc", Select( "CPI" ) ) ;
SIZE 77 ;
ALIGN DT_CENTER ;
EDITABLE MOVE DT_MOVE_NEXT
ADD COLUMN TO oBrw TITLE "Valor" ;
DATA FieldWBlock( "valor", Select( "CPI" ) ) ;
SIZE 95 ;
PICTURE "@E 999,999.99" ;
POSTEDIT { || SomaTotal(@nTotal,@nTotalPago,oBrw) } ;
ALIGN DT_RIGHT ;
EDITABLE MOVE DT_MOVE_NEXT
ADD COLUMN TO oBrw TITLE "Dt.Pagto" ;
DATA CPI->dpag ;
SIZE 77 ;
ALIGN DT_CENTER
ADD COLUMN TO oBrw TITLE "Vl. Pago" ;
DATA CPI->pago ;
SIZE 95 ;
PICTURE "@E 999,999.99" ;
ALIGN DT_RIGHT
ADD COLUMN TO oBrw TITLE "Cód. Vend" ;
DATA FieldWBlock( "codven", Select( "CPI" ) ) ;
SIZE 79 ;
ALIGN DT_LEFT ;
EDITABLE MOVE DT_MOVE_NEXT
oBrw:lMChange:=.f.
oBrw:SetColor( { 1, 3, 5, 7 }, { CLR_BLACK, CLR_BLACK, CLR_WHITE, CLR_BLACK } )
oBrw:SetColor( { 2, 4, 6, 8 }, ;
{ { CLR_TK, CLR_TK }, ; // degraded cells background color
{ CLR_WHITE, CLR_GRAY }, ; // degraded headers background color
{ CLR_KGC, CLR_KGC }, ; // degraded focused line
{ CLR_WHITE, CLR_GRAY} } ) // degraded order column background color
oBrw:SetColor( { 1, 2 },{ CLR_BLACK, { || Checa_Data() } },8 )
oBrw:lAutoEdit := .T.
oBrw:SetDeleteMode( .T., .F. )
oBrw:SetAppendMode( .T. )
oBrw:SetBtnGet( 1, "Prod16", { | oGet, dVar | aRect := GetCoors( oGet:hWnd ), ;
dVar := PesqPco( oGet:Value(), aRect[ 1 ], aRect[ 4 ], oGet:oWnd ), ;
oGet:cText( dVar ), oGet:Refresh(), oGet:KeyDown( VK_RETURN, 0 ) }, 16 )
oBrw:SetBtnGet( 2, "Prod16", { | oGet, dVar | aRect := GetCoors( oGet:hWnd ), ;
dVar := PesqFil( oGet:Value(), aRect[ 1 ], aRect[ 4 ], oGet:oWnd ), ;
oGet:cText( dVar ), oGet:Refresh(), oGet:KeyDown( VK_RETURN, 0 ) }, 16 )
oBrw:SetBtnGet( 9, "Prod16", { | oGet, dVar | aRect := GetCoors( oGet:hWnd ), ;
dVar := PesqVed( oGet:Value(), aRect[ 1 ], aRect[ 4 ], oGet:oWnd ), ;
oGet:cText( dVar ), oGet:Refresh(), oGet:KeyDown( VK_RETURN, 0 ) }, 16 )
REDEFINE BUTTON oBmpLis ID 69 OF oDlgAna PROMPT "&Listar" ACTION (RelatFrh( 'Agendamento de Títulos a Pagar', { 'CPI','FIL' }, 'agenda', 'R',,,, .f., {'CPI','FIL'} ),oBrw:GoTop(),oBrw:SetFocus(),oBrw:Refresh()) WHEN nOpc = 2
REDEFINE BUTTON oBmpBai ID 63 OF oDlgAna PROMPT "&Baixar" ACTION (Baixa(@nTotal,@nTotalPago,oBrw),oBrw:SetFocus(),oBrw:Refresh())
REDEFINE BUTTON oBmpImp ID 62 OF oDlgAna PROMPT "&Imprimir" ACTION (Imprime(),oBrw:SetFocus(),oBrw:Refresh())
REDEFINE BUTTON oBmpSai ID 68 OF oDlgAna PROMPT "&Fechar" ACTION (Libera_tudo(oDlgAna), oDlgAna:End())
ACTIVATE DIALOG oDlgAna CENTERED ON INIT oDlgAna:lHelpIcon:=.F.
DbCloseAll()
Libera_tudo(oDlgAna)
return nil
Kleyber Derick
FWH / xHb / xDevStudio / SQLLIB
FWH / xHb / xDevStudio / SQLLIB
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Kleyber,
OK, the first thing I notice is:
set relation to loja into FIL
This other file is not being displayed in the browse, so I don't think it is necessary. The use of SET RELATION is going to cause the reading of two records for each skip in the browsed database, which will dramatically slow down the refresh.
If you are using this database in one of your function calls, then you don't need to keep updating the record for each movement in the browsed database. Instead you can do one seek when the function is called.
I would also get rid of these codeblocks in the column definitions:
FieldWBlock( "ccusto", Select( "CPI" ) )
as they are not needed, just specify the fieldname. You will need to add:
oBrw:setRDD()
Those two changes should speed up the browse considerably. Please time it before and after, and I suggest running multiple time tests on each version, then finding the average for each. Let us know what you find out.
James
OK, the first thing I notice is:
set relation to loja into FIL
This other file is not being displayed in the browse, so I don't think it is necessary. The use of SET RELATION is going to cause the reading of two records for each skip in the browsed database, which will dramatically slow down the refresh.
If you are using this database in one of your function calls, then you don't need to keep updating the record for each movement in the browsed database. Instead you can do one seek when the function is called.
I would also get rid of these codeblocks in the column definitions:
FieldWBlock( "ccusto", Select( "CPI" ) )
as they are not needed, just specify the fieldname. You will need to add:
oBrw:setRDD()
Those two changes should speed up the browse considerably. Please time it before and after, and I suggest running multiple time tests on each version, then finding the average for each. Let us know what you find out.
James