Table vs Grid: performance overview

Discussion forum about all things Gupta, OpenText and the community.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3392
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Table vs Grid: performance overview

Post by Dave Rabelink » 15 Dec 2015, 22:31

To have a concrete basis on which object to use when large amounts of data need to be displayed, I performed some comparison tests on the table and grid.
The test application populates large amounts of rows and shows the time it takes to display the data.

First, I was curious about the differences between TD versions and also the difference between the good old table object and the grid.
Also to determine which method is best to populate tables and grids when performance is required: using SalTblInsertRow vs SalTblSetRange.

The test does only a raw populate, having only a few basic column types. No database access and no business logic.
At least it can give some idea which object has the potential best performance and also which TD version does it best.

So, here are the results. They are created on one fast development system. The tests are performed multiple times and are averaged.
(click on the images to expand. Smaller bars is better, times in milliseconds.)


Table object: performance comparison between TD versions
Table_AllTDVersions.png
The results are clear. On raw performance the ANSI TD 4.2 version is the best performer, followed closely by TD 6.2 and TD6.3.
There are huge differences between the latest TD versions (6.3 and 6.2) and the older ones (5.x, 6.0 and 6.1).
TD 5.x is about 2 times slower on the same test. So when performance on tables is really needed and you are on these TD versions, there will be a great gain in porting to the latest TD versions.


Table vs Grid (only TD 5.x and up)
Table_vs_Grid.png
TD 5.x is not only bad on tables, but grids are really slow on those versions. TD 5.x has a crawling speed populating large datasets.
What is surprising that the grid actually performs slightly better in the latest TD versions compared to tables. But it is a very small difference.


SalTblInsert vs SalTblSetRange (tables)
Insert_vs_SetRange.png
This is interesting. When you know the amount of rows to populate, the SalTblSetRange method is the most performant.
On tables, this method will be 2-4 times faster compared to SalTblInsertRow.
So, if you want to populate large amounts of data, try SalTblSetRange to see the speed you will gain.


Tables vs Grid vs Methods all TD versions
TableGrid_AllTDVersions.png

We see here that the huge difference between SalTblInsertRow and SalTblSetRange is not that pronounced on Grids. The difference is smaller compared to tables.


Overall conclusion from these results:

- SalTblSetRange is faster compared to SalTblInsertRow on all TD versions
- TD 5.x performs poorly on tables and specially on grids
- TD 6.2/TD 6.3 : no clear difference between table and grid performance and on par with older ANSI TD versions (4.2 was tested)
- When large amounts of data need to be displayed as fast as possible, use Table combined with SalTblSetRange to get the best performance.


Here the test application. The archive contains also the Excel file to create the graphs.
Please do your own tests, fill in the numbers and the graphs will update and show your personal results on your system.

https://samples.tdcommunity.net/index ... rmance.zip
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

frevelundfey

Re: Table vs Grid: performance overview

Post by frevelundfey » 16 Dec 2015, 09:36

Hi Dave,
very good work! Thanks for sharing.
Regards Thomas

mcwizardry

Re: Table vs Grid: performance overview

Post by mcwizardry » 28 Dec 2015, 14:41

Thanks for sharing your test results.

OeavDev
Austria
Posts: 98
Joined: 15 May 2018, 11:18
Location: Vienna

Re: Table vs Grid: performance overview

Post by OeavDev » 16 Mar 2016, 12:58

My observations:

SalTblReset Grid with 25000 rows: 100 seconds
SalTblReset Table with 25000 rows: 0.01 seconds.

=> grid is slower by factor of 10000x!!

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3392
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Table vs Grid: performance overview

Post by Dave Rabelink » 16 Mar 2016, 13:39

Did you use the attached test application from this thread?
And on which TD version do you see this?

I see a very small performance difference between table vs grid when calling SalTblReset.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 610
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

Re: Table vs Grid: performance overview

Post by Uwe van der Horst » 16 Mar 2016, 14:50

Dave Rabelink wrote:Did you use the attached test application from this thread?
And on which TD version do you see this?

I see a very small performance difference between table vs grid when calling SalTblReset.
A long time ago another user has reported this issue somewhere else in this Forums and gave a sample for this. The more rows you take the larger the difference.
You do not have the required permissions to view the files attached to this post.
Best regards,
Uwe van der Horst
Advo-web GmbH

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3392
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Table vs Grid: performance overview

Post by Dave Rabelink » 16 Mar 2016, 15:45

Yes, indeed. I see this now.

I will update the test application here to include the Reset time.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 1 guest