grid performance
Moderator: Rathinagiri
grid performance
hi all,
this is my first post, so i apologize in advance if i write something wrong.
I detect a strong slowdown when loading a grid.
Is there any way to understand where and why the executable is slowing down in performance?
Thanks Carlo
this is my first post, so i apologize in advance if i write something wrong.
I detect a strong slowdown when loading a grid.
Is there any way to understand where and why the executable is slowing down in performance?
Thanks Carlo
- AUGE_OHR
- Posts: 2117
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: grid performance
hi,
are you using DBF or Array ?
Network or LOCAL ?
i guess DBF so next Question : do you use "FILTER" ?
---
in Network, working on same DBF, will slow down
---
when using Image in Grid it will slow down
so please more Information
are you using DBF or Array ?
Network or LOCAL ?
i guess DBF so next Question : do you use "FILTER" ?
---
in Network, working on same DBF, will slow down
---
when using Image in Grid it will slow down
so please more Information
have fun
Jimmy
Jimmy
Re: grid performance
Hi,
I'm using array in local. no images.
I've included the grid loading in a function. At the first access, the grid works fine.
In following ones, the grid loads very slowly
In the load function, firstly I check if grid exists, delete and define, else only define
Please see the attachment.
I'm using array in local. no images.
I've included the grid loading in a function. At the first access, the grid works fine.
In following ones, the grid loads very slowly
In the load function, firstly I check if grid exists, delete and define, else only define
Please see the attachment.
- Attachments
-
- 2021-11-09_081012.jpg (45.39 KiB) Viewed 1340 times
Re: grid performance
When you want to browse arrays, use VIRTUAL GRID, it's really speedy.
Re: grid performance
can you explain it better please?
Re: grid performance
when you're defining GRID control, you can use VIRTUAL as .T.
You must define OnQueryData procedure which distributes data to GRID control to display it.
See examples in hmg344\samples\controls\grid
You must define OnQueryData procedure which distributes data to GRID control to display it.
See examples in hmg344\samples\controls\grid
Re: grid performance
I thank you but it is too difficult for my knowledge
- AUGE_OHR
- Posts: 2117
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: grid performance
hi
it is realy easy to use VIRTUAL with GRID
lets talk about Sample \SAMPLES\Controls\Grid\GRID_02\demo.prg
VIRTUAL -> enable Virtual ( LVN_GETDISPINFO )
ITEMCOUNT -> max. Lenght -> LEN(Array)
ON QUERYDATA -> Procedure to "show" Data
have a look in Help File for GRID and look for "This"
come from right side
This.QueryRowIndex -> ROW of Data
This.QueryColIndex -> COL of Data
so Procedure QueryTest() use "Information" of "This" to display Data of GRID
! Note :
while that Part of Code are need for every Cell do not put too much Code into QueryTest() if you want to "manipulate" Data
have fun
it is realy easy to use VIRTUAL with GRID
lets talk about Sample \SAMPLES\Controls\Grid\GRID_02\demo.prg
Code: Select all
VIRTUAL ;
ITEMCOUNT 100000000 ;
ON QUERYDATA QueryTest()
ITEMCOUNT -> max. Lenght -> LEN(Array)
ON QUERYDATA -> Procedure to "show" Data
Code: Select all
Procedure QueryTest()
This.QueryData := Str ( This.QueryRowIndex ) + ',' + Str ( This.QueryColIndex )This.QueryData -> "Result" Data of Cell in a GRIDProperties Available For OnQueryData Procedure:
- This.QueryData
- This.QueryRowIndex
- This.QueryColIndex
come from right side
This.QueryRowIndex -> ROW of Data
This.QueryColIndex -> COL of Data
so Procedure QueryTest() use "Information" of "This" to display Data of GRID
! Note :
while that Part of Code are need for every Cell do not put too much Code into QueryTest() if you want to "manipulate" Data
have fun
have fun
Jimmy
Jimmy
Re: grid performance
Thanks
I will try asap
I will try asap
Re: grid performance
done. now it's faster than before
but, if I use the Virtual command, the checkbox disappears. Why?
but, if I use the Virtual command, the checkbox disappears. Why?
Code: Select all
DEFINE GRID GRD1
PARENT CDL1
ROW 145
COL 20
WIDTH 830
HEIGHT 800
HEADERS { 'MATRICOLA', 'COGNOME', 'NOME', 'DATA NASCITA', 'CATEGORIA', 'NREC'}
FONTSIZE 11
FONTBOLD .t.
WIDTHS { 120, 200, 200,135,153,0}
ITEMS AISCRITTI
BACKCOLOR {03, 119, 127}
FONTCOLOR WHITE
ALLOWSORT .T.
VALUE posrec
CHECKBOXES .T.
VIRTUAL .t.
ON CHANGE LoadData(This.Item(this.value))
ON DBLCLICK ENABLEFIELD()
ON QueryData QueryTest()
END GRID
RETURN
*-------------------------------------------------------------------------------
function QueryTest()
local x := this.queryrowindex
local y := this.querycolindex
this.querydata := aiscritti[ x, y ]
return nil