In my project I have tens of UltraNumericEditors that are bound to a DataTable that is populated by a database.
I am suffering from terrible performance when trying to resize a Form that contains these UltraNumericEditors at run-time.
The problem seems to be that DataTable contains nulls for these values initially and the idea is that the user fills the values in.
Before they do this, if the user resizes the form the application almost hangs. If they then populate these UltraNumericEditors with a number the performance issues go away – that is they are able to resize the form without issue.
If I bind to any other control, for example an UltraTextEditor, I see no such issue.
I have attached a sample project in Visual studio 2010, VB.NET, Infragistics 2011.1 that connects to a SQL Server Compact v4.0 database which you’ll find in the Bin folder. The project only has 9 lines of code and binds 6 UltraNumericEditors. Even with just 6 the performance of the resize is awful. It is astounding how much better it is once the UltraNumericEditors are populated with values.
It has taken me several days to go from noticing this resize problem to being able to boil it down to this simple project so I am now quite anxious to find out why this performance issue occurs and what I can do about it. Can you help, please?
Thanks!
I am unable to find my case in My Support Activity. I see this:
"We don't have any active support requests associated with this account. Please check the "Resolved" tab to view your resolved requests, if any."
Thanks
Hello,
I will be happy to help you out with this issue.
I have created a case for you to better assist you with this issue going forward. To access the case, simply log into your IG account and click on My Support Activity.
Please let me know if you have further questions in this matter utilizing the case created.
That's great, thanks. Will this be provided as a hot fix soon, or will I have to wait for a full release?
Either way, is there some mechanism to keep me in the loop so i know when it is fixed or when it is likely to be fixed?
TIA
Hi,
Thanks for the new sample I am able to reproduce the problem.
Basically, this happens because the UltraNumericEditor is trying to convert the value from the data source (DBNull.Value) into the correct NumericType (double in this case) using System.Convert. This raises an exception, which is caught and handled, but it causes a big performance hit.
In older versions, the control did not try to convert the value unless it was already a numeric type, so it would have ignored DBNull and no exceptions would have been raised.
This is obviously a bug and it's something we should be able to fix quite easily by checking for null and DBNull before we attempt the conversion.
So I'm going to forward this thread over to Infragistics Developer Support and ask them to create a case for you and write this issue up for developer review so it can be fixed.
In fact, this is not related to the DataTable, just the UltraNumeric editor.
Essentially, if you have many UltraNumeric editors on a form with their Value property set to DBNull then the Form's resizing performance is very poor.
However, what is strange is that this performance issue only occurs when running inside Visual Studio. If I run the executable on it's own then the resizing performace is fine.
A little more testing has now shown:
My conclusion - the UltraNumericEditor in Infragistics v2010.3 and onwards developed a bug which is causing very poor resizing/layout performance when run within Visual Studio.