We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Slow Formula Engine

Thread ID:





14345 May 25,2004 03:56 PM UTC May 26,2004 05:59 AM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On May 25, 2004 03:56 PM UTC

I experience that the formula engine is rather slow at times. This is very noticable when a grid in a multi-sheet family is show for the first time. I have 7 sheets. All are smaller than 10 x 20 cells and have cross-sheet formulas. What is the recommended way to gain maximum speed here?

Administrator [Syncfusion]
Replied On May 25, 2004 04:24 PM UTC

The default behavior is for the grid to parse and compute formulas the first the value is assessed for any reason. So, if you have a cell that is not originally visible, and depends upon several other cells that are not originally visible, the first time the cell is shown, the grid will have to parse and compute all these values. One thing you can try to is go ahead and force the grid to parse and compute all (or maybe a few) cells when the grid is initially loading. This puts all the delay at one place and time which may or may not be good. To do this you would call engine.RecalculateRange with the second argument true. GridFormulaEngine engine = ((GridFormulaCellModel)this.gridControl1.CellModels["FormulaCell"]).Engine; engine.RecalculateRange(GridRangeInfo.Table(), true); But this only accesses the first sheet registered. We will add a overload that will allow you to call this method on different sheets. You can do the same thing though, by trying to access grid[row, col].FormattedText for every cell(row, col) you want to force a calculation on. Accessing the style.FormattedText will trigger a calculation. string s = grid[row, col].FormattedText Once the calculations have been done, then the only time the values are recomputed would be if one of its dependent cells was changed. So normally, after the first calculations, things are fairly responsive.

Administrator [Syncfusion]
Replied On May 26, 2004 05:18 AM UTC

Thanks. These hint will give me a method to improve response after initial grid construction.

Administrator [Syncfusion]
Replied On May 26, 2004 05:59 AM UTC

One other thing to check. Set the debugger to break on exception to see if there are any exceptions being thrown during this load process. These can slow things down tremendously as there is normally a 1 or 2 second delay with each exception.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon