Colspan slows down grid control a LOT

May 25, 2009 at 6:37 PM

I have a large grid (730columns, 200 rows), it is very fast until I start adding any colspans.

The initial screen that appears can scroll up and down really fast, but as I move the scrollbar to the right, the interface starts to become slow and chuggish.

I have a requirement for *LARGER* colspans. for example, up 200, but if I increase the max size to that, the interface becomes unusable.

Anyone know if an other way to speed up the interface? For the rows that I need to span the complete 730, I created 73 10cell grids with no border, but there has to be a better way. 

Thank you!
Derek

Coordinator
May 26, 2009 at 10:11 AM

Hi,

 

There is a performance problem with column/row spans.  The problem is in the algorithm that is used to manage spanned cells. There is a solution to solve this, but it requires to change the underlying mechanism to find a spanned cell, given a conrete position.


There is also a ticked created here: http://sourcegrid.codeplex.com/WorkItem/View.aspx?WorkItemId=3034

I would be glad for any help. If some one is interested to submitting a patch, i could share my vision how this problem should be solved. Of course, other solutions are more than welcome.

Coordinator
May 26, 2009 at 10:11 AM

P.s. the task is not that difficult, should take not more than 2 days to fully implement this.

May 26, 2009 at 11:17 AM

Could you tell me what function the slowdown is in? The workitem references a function name, but I cannot find it .....

May 26, 2009 at 12:25 PM

Take a look at the trunk version , there is some corrections for the columspan but ValidateCellSpan  decrease  the grid's performance even you use a cellspan or not .

Coordinator
May 27, 2009 at 5:50 AM

Please look at the issue again, i've posted a comment pinpointing where is the function, and how new algorithm might work.


Let's move all the discussions to that issue :)

Jun 1, 2009 at 12:55 PM

I think there is a different issue then just the validateCellSpan.

If I add "if (true) return" it does speed up the initial filling of the table (as you would expect) however I still get the crippling slowdowns when I start moving the scroll bars around.

Can you run JetBrains on the grid when it is being moved when there are a number of cells that have the colspan set?

It is really easy to reproduce, and as I indicated, the grid becomes unusable.

Thank you very much, I'll investigate the slowdown when you can pinpoint for me where it is occuring ....

Derek

Jun 1, 2009 at 5:06 PM
Edited Jun 1, 2009 at 5:08 PM

I would like to know  if you tried to remove the validateCellSpan and see if any exception is throwed , i removed this function a the last trunk version and all work well :) even the spanned cells .

 

also have you this examples explained by dariusdamalakas

"...  if you want to make one cell to span 100 columns, and another cell span 100 rows, then these two cells can not intersect.... "

Jun 1, 2009 at 5:16 PM

I added a return true on the first line of the function, so that function really it is not running ... and I have not had any issues with my cell spanning etc.

Mind you, when I am plotting, I ensure before I plot something to the grid that there is no overlap .... but even after this change, when I go full screen and start scrolling up and down, the system becomes VERY slow..

I do not know how in a real life example you would want the 100 column/100 row span . I usually only span up or down, not both.

My current issue is that when there are a number of cells using column spanning, the grid slows down when you try scrolling up/down and left/right to the point that it is not usable.

derek

Coordinator
Jun 2, 2009 at 6:25 AM

@abirdd,

Thanks for your feedback, and sorry that there is such a big problem with spanning.  What was initialy though of an improvement, turned out to be both an improvement, and a hindrance.

The improvement had to be made so that there would be no drawing problems, and there were also selection problems. So now they are all gone, but the performance is terrible.

A the moment i'm working a lot now to release a new SourceGrid version, and answering all questions in the forums. So my plans for the next month are more or less like this:

 * release a new version this week.

 * continue support for forums and issues

 * resolve column span issue

 * perhaps in late june release a new maintenance version just to fix bugs

So if this schedule fits for you, then next month we might resolve this issue. if not, then i welcome any help, and can provide any support needed.

 

Jun 4, 2009 at 1:43 PM

If you can tell me where the slowdown is, I can figure out how to improve the performance. My setup here does not have any profiling tools.

~D

Coordinator
Jun 4, 2009 at 7:22 PM

There is an issue created here : http://sourcegrid.codeplex.com/WorkItem/View.aspx?WorkItemId=3034

iu hope there's enough info

Jun 10, 2009 at 6:00 PM

See the related workitem . I changed the Grid.cs cell getter to be more efficient.