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

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

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

Post 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
Attachments
grid_35.zip
(1.55 MiB) Downloaded 348 times
browse_35.zip
(1.55 MiB) Downloaded 514 times
data.zip
(40.35 KiB) Downloaded 290 times
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

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

Post by andyglezl »

Tal vez esto ayude...
-------------------------------
Maybe this help...


viewtopic.php?f=24&t=4826&p=45910&hilit ... ezl#p45907
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

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

Post by mol »

I had the same problems. I'm still using browse control for dbf files.
Please inform, if your tests will change anything.
User avatar
serge_girard
Posts: 3158
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

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

Post 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
There's nothing you can do that can't be done...
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

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

Post 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
jpuntoapunto
Posts: 36
Joined: Sat Jun 01, 2013 6:50 pm

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

Post 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.
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

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

Post by trmpluym »

Nope, like Marek i also switched back by using the browse control.
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

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

Post 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.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
mjaviergutierrez
Posts: 145
Joined: Fri Nov 30, 2012 7:51 pm
Location: San Lorenzo, Santa Fe, Argentina

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

Post 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
...
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

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

Post 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.
Post Reply