Page 1 of 4

Grid performance terribly slow on a file share, browse works well

Posted: Mon Jan 02, 2017 7:26 pm
by trmpluym
Dear HMG friends,

I recently created an application. I build the application using a grid with a dbf because according the HMG documentation the grid control is the preferred control over the browse control. The application works fine standalone. But when use the application in a LAN (on a file share) the grid part works slower but still acceptable. It changes when a second user on a different computer opens the same application. When i open the application the it takes about more than two minutes to start ! Also on the first computer the application becomes very slow.

I searched the forum and found this topic: viewtopic.php?t=3540

So i used another file server with SMB 1 and the required registry settings but still the result is very dissapointing.

So i desided to do some test. I created two allmost identical sample's. One with a Grid and one with a Browse control. Both with the same dataset. The grid version of the application is terribly slow (when used on two computers) but the browse version works very well !
I even tried the virtual grid, same result, painfully slow !

So do i have to rewrite my application with a browse control in stead of a grid or is there a better solution ?

Is the browse control for DBF files still the better choice ?

Theo

Re: Grid performance terribly slow on a file share, browse works well

Posted: Tue Jan 03, 2017 1:49 am
by andyglezl
Tal vez esto ayude...
-------------------------------
Maybe this help...


viewtopic.php?f=24&t=4826&p=45910&hilit ... ezl#p45907

Re: Grid performance terribly slow on a file share, browse works well

Posted: Tue Jan 03, 2017 7:43 am
by mol
I had the same problems. I'm still using browse control for dbf files.
Please inform, if your tests will change anything.

Re: Grid performance terribly slow on a file share, browse works well

Posted: Tue Jan 03, 2017 12:57 pm
by serge_girard
Theo,

In my opionon is it better to limit the number records in the grid (why need +50.000 records in a grid?).

In order to get a smaller amount I use filtering of all KEYS and significant fields, 1 button 'Start Selection' , then:
- check filter fields
- open database
- empty GRID
- refill with records who match filtering criteria
- close database

If even filtering gives too much records (count them first) try considering: paging (see webshops etc.). This is more complex but I have done it before...

On the GRID itself:
ON HEADCLICK { { || Sort_Grid_1(1)}, { || Sort_Grid_1(2)} , { || Sort_Grid_1(3)}, { || Sort_Grid_1(4)} , ;
{ || Sort_Grid_1(5)}, { || Sort_Grid_1(6)} }

Then you only need 1 master-index to keep updated and your database is mostly closed even when a user has opened and selected records and goes for a long coffee-break...

Greetings,

Serge

Re: Grid performance terribly slow on a file share, browse works well

Posted: Wed Jan 04, 2017 6:29 pm
by trmpluym
Thanks Andrés and Serge,

The solution you both supplied is using an array source and fill the array with de data from the DBF.
This is a good workaroud but it is still a fact a grid is very sloooooow when using a an DBF source with multiple users on a lan.
Using exactly the same data the browse control is much faster.

For some parts of my program i can easy implement the solution supplied by Andrés and Serge. But for other parts it is very compicated to use the array solution (especialy when i use a filter, order and scope on the DBF data).
So i will also revert back to the browse control for these parts of my program until somebody finds a solution.

Theo

Re: Grid performance terribly slow on a file share, browse works well

Posted: Thu Sep 28, 2017 2:43 pm
by jpuntoapunto
trmpluym wrote: Mon Jan 02, 2017 7:26 pm Dear HMG friends,

I recently created an application. I build the application using a grid with a dbf because according the HMG documentation the grid control is the preferred control over the browse control. The application works fine standalone. But when use the application in a LAN (on a file share) the grid part works slower but still acceptable. It changes when a second user on a different computer opens the same application. When i open the application the it takes about more than two minutes to start ! Also on the first computer the application becomes very slow.

I searched the forum and found this topic: http://www.hmgforum.com/viewtopic.php?t=3540

So i used another file server with SMB 1 and the required registry settings but still the result is very dissapointing.

So i desided to do some test. I created two allmost identical sample's. One with a Grid and one with a Browse control. Both with the same dataset. The grid version of the application is terribly slow (when used on two computers) but the browse version works very well !
I even tried the virtual grid, same result, painfully slow !

So do i have to rewrite my application with a browse control in stead of a grid or is there a better solution ?

Is the browse control for DBF files still the better choice ?

Theo
Hello

Did you solve your problem with Grid slowness?
I did not find a solution and gave up.

Here I leave you link to a thread that I opened a while ago with this problem.

http://www.hmgforum.com/viewtopic.php?p=45847#p45847

Saludos.

Re: Grid performance terribly slow on a file share, browse works well

Posted: Thu Sep 28, 2017 9:19 pm
by trmpluym
Nope, like Marek i also switched back by using the browse control.

Re: Grid performance terribly slow on a file share, browse works well

Posted: Fri Sep 29, 2017 5:35 am
by Rathinagiri
If your grid is going to deal with 1000+ records/lines, why don't you go for Virtual?

Virtual grids can handle infinite number of records without any hustle. Because, even though the grid may contain millions of records, it has to show only a screenful of records ie., may be 50 maximum. So, virtual grids want only that 50 records only at a time, and you supply only those 50 records only whenever it is asked by the system.

Re: Grid performance terribly slow on a file share, browse works well

Posted: Wed Oct 04, 2017 5:00 pm
by mjaviergutierrez
Where there is a clear example of the use of VIRTUAL GRID ?,
Using it with DBF's. I could never make it go, I got tired of begging for an example, so I abandoned it, I had to change for control BROWSE

Re: Grid performance terribly slow on a file share, browse works well

Posted: Wed Oct 04, 2017 8:33 pm
by mol
I'm still using browse in my apps.
But, after few windows server and windows workstations updates, browse doesn't work quick as later.
I think, the only way is to load dbf file to array and use virtual grid to display it.