Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
enjoyit  
#1 Posted : Monday, April 18, 2016 7:06:24 AM(UTC)
enjoyit

Rank: Member

Groups: Registered
Joined: 3/24/2016(UTC)
Posts: 28
Location: Kassel

Thanks: 1 times
Hi,

i have some performance issues building the grid (takes up to 30 seconds, without autosizing it is only half of a second) when the grid contains a lot of rows (>2000) when i autosize all columns after filling the grid via FillFromRS.

Is it possible that the grid just uses the first 100 rows eg to autosize the columns to make it faster?

I use this function to autosize the columns:

Code:
For int_i = 1 To lf_object.ColCount
        
     lf_object.AutoWidthCol int_i

Next int_i


thanks!

Edited by user Monday, April 18, 2016 8:50:26 AM(UTC)  | Reason: Not specified

Igor/10Tec  
#2 Posted : Tuesday, April 19, 2016 10:35:01 AM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
First of all, wrap your auto-width-col code with the BeginUpdate/EndUpdate method calls.

The column auto-width operation implies that all column cells are involved into process - unless we cannot calculate the minimal width. And calculating the cell contents width is a complex operation, so it may take some significant amount of time.
enjoyit  
#3 Posted : Tuesday, April 19, 2016 10:48:06 AM(UTC)
enjoyit

Rank: Member

Groups: Registered
Joined: 3/24/2016(UTC)
Posts: 28
Location: Kassel

Thanks: 1 times
I even use the BeginUpdate/EndUpdate method.

I was wondering because the standard listview-Object is a lot faster in this point? :-D
Igor/10Tec  
#4 Posted : Tuesday, April 19, 2016 3:07:29 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
ListView uses much simpler 'cell' layout.

You can also send me a sample that demonstrates your performance problem. I will gladly examine it together with iGrid under the debugger.
Igor/10Tec  
#5 Posted : Wednesday, March 22, 2017 2:13:16 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 1,111

Thanks: 15 times
Was thanked: 141 time(s) in 141 post(s)
We have fixed this problem in iGrid 6.5 released today. The problem was in the dynamic content events (CellDynamicText, CellDynamicFormatting, ...) raised for every cell. This problem was especially noticeable in Microsoft Access - VB6 apps did not suffer from this problem. Now all those dynamic content events are turned off by default, and the performance of AutoWidthCol in MS Access is good enough.

BTW, iGrid 6.5 also introduces one more method to do the auto-width work for all columns in one call - it's AutoWidthCols.
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.