xbrowse very slow vs Xbrowser

xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Wed Nov 06, 2024 11:04 pm

Pls see this ( xbrowse with array con 91 columns

Image

I have 100 records on xbrowse

when I scroll the xbrowse is very slow and the separator lines are not refreshed, I insert line black each ten columns

I tried also with 20 records


Image



If I use xbrowser adata the dialog of xbrowser is fast how it is possible ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby nageswaragunupudi » Thu Nov 07, 2024 9:01 am

f I use xbrowser adata the dialog of xbrowser is fast how it is possible ?


In the case of XBrowser, the browse is created by FWH's code.
In the case of direct XBrowse, the browse is created by the programmer.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Thu Nov 07, 2024 9:12 am

nageswaragunupudi wrote:
f I use xbrowser adata the dialog of xbrowser is fast how it is possible ?


In the case of XBrowser, the browse is created by FWH's code.
In the case of direct XBrowse, the browse is created by the programmer.


yes of course

I have these problems, can I have an example with 91 columns, 100 records where I can scroll faster?


then I saw also if I use
Code: Select all  Expand view  RUN
:SetGroupHeader( "Estrazione",        1,  1  )
                      :SetGroupHeader( "Decina 1-10",       2,  11 )
                      :SetGroupHeader( "Decina 11-20",     12,  21 )
                      :SetGroupHeader( "Decina 21-30",     22,  31 )
                      :SetGroupHeader( "Decina 31-40",     32,  41 )
                      :SetGroupHeader( "Decina 41-50",     42,  51 )
                      :SetGroupHeader( "Decina 51-60",     52,  61 )
                      :SetGroupHeader( "Decina 61-70",     62 , 71 )
                      :SetGroupHeader( "Decina 71-80",     72,  81 )
                      :SetGroupHeader( "Decina 81-90",     82,  91 )


it is slowly , It's as if the headers slow down the scrolling of the columns

ifI use lheader:=.f. the speed is satisfactory
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Thu Nov 07, 2024 9:41 am

Now with these clausole

:lFullPaint:=.t.
:lFastDraw:=.t.


it seems to go faster, I don't know what these two variables are, I found them by chance in the xbrowse class

Image



Now I must only resolve the problem on paint lines I made also
Code: Select all  Expand view  RUN
oDlg:bPainted  := { |hDC| PaintDlg( hDC, oDlg, oBrw ) }

static function PaintDlg( hDC, oDlg, oBrw )

   ( hDC )

      Marcar_Lines(oBrw)
 
      oBrw:Refresh()

return nil

static Function Marcar_Lines(oBrw)

           WITH OBJECT oBrw

              FOR i := 1 TO 91  STEP 10
                  oCol := :aCols[ i ]
                  ColPenColor( oCol, CLR_BLACK,:nSizePen )
               NEXT

         END


  oBrw:refresh()
  return nil



any solution ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby nageswaragunupudi » Thu Nov 07, 2024 10:53 am

Image

Sorry I posted here an animgif, with very very fast panning but unfortunately the imageshack server itself is very slow today.
Ignore it.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse very slow vs Xbrowser

Postby nageswaragunupudi » Thu Nov 07, 2024 11:10 am

Code: Select all  Expand view  RUN
oBrw:lFastDraw := .t.

Improves the speed if the browse is simple and screen ornamentation is less.

FWH provides 3 alternative browses, TWBROWSE, TCBROWSE, TXBROWSE.
Nobody compels us to use XBrowse only for every browse.
We better use the most suitable browse for our requirements.
In this case WBrowse is simpler and provides faster horizontal spanning speeds. You may consider WBrowse, wherever you do not require the extra screen-rich features of xbrowse.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Thu Nov 07, 2024 11:49 am

nageswaragunupudi wrote:
Code: Select all  Expand view  RUN
oBrw:lFastDraw := .t.

Improves the speed if the browse is simple and screen ornamentation is less.

FWH provides 3 alternative browses, TWBROWSE, TCBROWSE, TXBROWSE.
Nobody compels us to use XBrowse only for every browse.
We better use the most suitable browse for our requirements.
In this case WBrowse is simpler and provides faster horizontal spanning speeds. You may consider WBrowse, wherever you do not require the extra screen-rich features of xbrowse.



TWBROWSE there is no update Ceccarelli abandoned it many years ago, it does not have the graphic style of the new Windows (seven/10) and I do not think that supergroup headers can be made

Same for TCBROWSE or Superbrowse of Mercado

so I would be forced to use TXBROWSE it is the only one with the best graphics and with the possibility of creating double headers

I always use the dbu of emg giordano (emagdbu) and I saw that an archive of 10538 records and 59 columns goes very fast, I would like to know if it uses xbrowse or wbrowse
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Thu Nov 07, 2024 12:36 pm

nageswaragunupudi wrote:
Code: Select all  Expand view  RUN
oBrw:lFastDraw := .t.

Improves the speed if the browse is simple and screen ornamentation is less.



I tried to use this on your function (viewtopic.php?f=3&t=42291&hilit=xbrowse&sid=219eb3f552cfafd821f3d23014eac849#p254116) I call it "Method NagesProcedure(aCell,aVals,nOption) CLASS TLotto"

I use on procedure to show lotto.dbf

and it make this error

Code: Select all  Expand view  RUN
  Called from: Source\lotto\tlotto.prg => (b)TLOTTO_NAGESPROCEDURE( 995 )
   Called from: C:\work\Lib32\xbrowse.prg => TXBROWSE:PAINT( 2504 )
   Called from: C:\work\Lib32\xbrowse.prg => TXBROWSE:DISPLAY( 2218 )


I'm afraid I have to resign myself and give up, unfortunately in the application I'm making I have to display a lot of data, a lot of columns because there are many of them from the Italian lottery archive, I could limit myself to not inserting frills that could weigh down the dialog too much but the result is not satisfactory
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby nageswaragunupudi » Thu Nov 07, 2024 12:59 pm

Never giveup

TLOTTO_NAGESPROCEDURE: I dont know what is this.
Whatever is it, not a good idea to import some function

Try WBrowse.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Thu Nov 07, 2024 1:29 pm

nageswaragunupudi wrote:Never giveup

TLOTTO_NAGESPROCEDURE: I dont know what is this.
Whatever is it, not a good idea to import some function

Try WBrowse.


Do you remember viewtopic.php?f=3&t=42291&hilit=xbrowse&sid=219eb3f552cfafd821f3d23014eac849#p254116 ?

I use this code ( you wrote)
Code: Select all  Expand view  RUN
WITH OBJECT oBrw
      :nMarqueeStyle   := 2

      AEval( :aCols, { |o| o:nWidth := 36 }, 2 )

      for n := 2 to Len( :aCols )
         :aCols[ n ]:bLDClickData   := < |r,c,f,oCol|
            local nRow,nCol,nVal,nAt
            if lNumber == .f.
               nRow  := oCol:oBrw:nArrayAt
               nCol  := oCol:nCreationOrder
               nAt   := AScan( aCell, nRow * 100 + nCol )
               if nAt == 0
                  AAdd( aCell, nRow * 100 + nCol )
               else
                  HB_ADel( aCell, nAt, .t. )
               endif
               oCol:oBrw:Refresh()
            elseif lNumber == .t.
               nVal  := oCol:Value
               nAt   := AScan( aVals, nVal )
               if nAt == 0
                  AAdd( aVals, nVal )
               else
                  HB_ADel( aVals, nAt, .t. )
               endif
               oCol:oBrw:Refresh()
            endif
            return nil
            >
      next

      :bClrStd := < |b,oCol|
         local nRow, nVal, n
         local nCol  := oCol:nCreationOrder
         if nCol > 1
            if lNumber == .f.
               nRow  := b:nArrayAt
               if AScan( aCell, nRow * 100 + nCol ) > 0
                  return ValToColor( oCol:Value )
               endif
            elseif lNumber == .t.
               nVal  := oCol:Value
               if AScan( aVals, nVal ) > 0
                  return ValToColor( nVal )
               endif
            endif
         endif
         return { 0, CLR_WHITE }
         >

     :CreateFromCode()
   END



I always used Wbrowse before using Xbrowse, what do I do now, do I go back? With what unknown? is there a support ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Fri Nov 08, 2024 8:01 am

Dear Nages, Dear Antonio

Image

I asked a friend who uses VBnet to make me a table with my archive and I could notice that unlike Xbrowse the horizontal and vertical scroll is larger than Xbrowse, I mean the scroll bar and therefore the user immediately scrolls to the 90th column, so I ask you is it possible to implement this thing also in xbrowse? that is, increase the scroll bar if the columns are at least more than 50.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby Otto » Fri Nov 08, 2024 8:53 am

Silvio, imagine how many windows (handles) you are using here.
With xBrowse, you have the performance where practically every cell is a window and has all functionality.
This costs resources.
I had the same problem with my room plan and the cash register. Initially, I also tried a browser approach, but it is too slow.
You need to create your own paint method here.

You have to work with coordinates and use oWnd:say(), oWnd:line(), etc.
But it is quite a bit of work.

Have you tried with LISTBOX?
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: 6364
Joined: Fri Oct 07, 2005 7:07 pm

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Fri Nov 08, 2024 10:27 am

Otto wrote:Silvio, imagine how many windows (handles) you are using here.
With xBrowse, you have the performance where practically every cell is a window and has all functionality.
This costs resources.
I had the same problem with my room plan and the cash register. Initially, I also tried a browser approach, but it is too slow.
You need to create your own paint method here.

You have to work with coordinates and use oWnd:say(), oWnd:line(), etc.
But it is quite a bit of work.

Have you tried with LISTBOX?
Best regards,
Otto



Do you seen the last video ?

Visualbasic net
Image

Xbrowse
Image

look at the horizontal scrollbar class cursor.

how do i increase the size of the scrollbar cursor?

because if the cursor is small the user has to scroll to get to the end of the 90 columns

if the cursor is large the user can get to the end of the 90 columns in two clicks and thus also save resources


I think I didn't ask for the moon, it's not xbrowse's fault

I haven't used listbox (wbrowse) for many years and then listbox doesn't have e style support for win7/win10/win11, it doesn't work with tdatabase, I can't create double headers....


The goal is to increase the size of the thumb on the horizontal scroll bar, so that it visually represents a larger portion of the scrollable area. Increasing the size of the horizontal thumb can be useful when you have many columns in your XBrowse and you want the user to better see how much scrollable space there is compared to the visible data.

I tried to change the size of the thumb

Code: Select all  Expand view  RUN
function silvio_scroll( oBrw )
   local nMaxCol := len(oBrw:GetDisplayCols())
   local nVisibleCol := len(oBrw:GetVisibleCols())
   local nRange := nMaxCol - 1
   local nThumbSize := Max( 1, ( nVisibleCol * nRange ) / nMaxCol )

  if oBrw:oHScroll != nil
     oBrw:oHScroll:SetRange( 0, nMaxCol )
      oBrw:oHScroll:SetPage( nVisibleCol, .t. )
    SetScrollInfo( oBrw:oHScroll:hWnd, SB_HORZ, nThumbSize, .t. )
   endif

return nil


but the thumb size is also smaller
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Mon Nov 11, 2024 9:45 am

Nages,
How I can make to increase the cursor of Horizontal Scroll bar as you can see in this video made with Vb net ? ( Componet Datagridview https://krypton-suite.github.io/Standard-Toolkit-Online-Help/Source/Help/Output/articles/Toolkit/KryptonDataGridView.html)

Image

Notice
the thumb is increased by more than half of the columns in fact initially it supports about 40 columns
by doing this the user does not have to scroll through all the columns and I think there is also a saving of resources,
instead the thumb of the vertical bar is slightly larger
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse very slow vs Xbrowser

Postby Silvio.Falconi » Wed Nov 13, 2024 8:22 pm

In these days I tried both with Wbrowse (version 17a by Ceccarelli that I don't think is the official one by Fwh) and also the Sbrowse by Manuel Mercado and unfortunately I had the same slow result as xbrowse.

Then this evening I went looking for a solution to scroll my archive faster and I came across an old class of a C5 library, the famous Grid, and I tried the test prueba19.prg, which creates an array from a large BigBase dbf archive.

As you can see in this video, scrolling is very fast

Image

Then I tried to recreate the same example ( prueba19) but with xbrowse and I saw the difference

the test

Code: Select all  Expand view  RUN
#include "fivewin.ch"

Function test()
Local oCol, oGrid
Local cCol
Local n, n2
local aTabla := array( 101, 100 )

USE BIGBASE ALIAS BIGBASE

 for n2 := 1 to 100
     aTabla[ 1, n2 ] := n2
 next

for n := 1 to 100
    for n2 := 2 to 101
       aTabla[ n2, n ] := bigbase -> ( fieldget( n2 - 1 ) )
    next n2
    bigbase->( dbskip(1) )
next n

dbclosearea("bigbase")



DEFINE WINDOW oWnd TITLE "Test velocity hscroll from bigbase.dbf"

   @ 0,0 XBROWSE ogrid OF oWnd ;
      array aTabla LINES CELL fastedit

      oWnd:oClient := ogrid

   ogrid:createfromcode()

ACTIVATE WINDOW oWnd MAXIMIZED

Return nil







 


Image

how is this possible?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7090
Joined: Thu Oct 18, 2012 7:17 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 13 guests