Hi :
I installed the Demo version of the NetAdvantage Winforms product and created a form with four (4) controls on it (no code behind): two numeric, one date control and one combo box (bound to a local datatable).
When I ran the project in the IDE, it was VERY slow loading. In fact, you could see it "paint" the controls on the form. I even tried to run the EXE outside of the IDE, but it, too, was very slow painting the form.
We are evaluating the product to see if it fits our needs in developing Winforms applications in VS2008. My concern is that if it is this slow with only four (4) controls on the form (and no code), what will the performance be when we have over 100 controls on the form and code behind?
Any help would be appreciated.
This is definitely not normal behavior, though I don't know what could be causing this. If you can attach a sample project to your post (through the Options tab when you reply), I can take a look at it to see if anything is going wrong. You could also contact Developer Support to see if they're aware of anything that be causing this issue.
Does removing the binding cause the form to respond normally? Does the same thing happen if you bind in-box .NET controls to your DataTable instead?
-Matt
Hi Matt:
The project is attached. You will have to bind the combobox to your own DataTable, as I bound it to a table that I created from a SQL Server table.
Kevin
Kevin,
I'm not sure what could be causing your slowdown at design-time; opening the project in Visual Studio loaded fine for me. At run-time, it's hard to say what's causing the slowdown, but it's possible that you're loading a large amount of data. How many rows exist for each of the combos?
There are only 27 records in the table -- very small. Is the combobox what is causing the slowdown? This is a relatively small DataTable (3 columns by 27 rows).....
I don't know what's causing the slowdown; as I mentioned, it wasn't running slow for me. 27 rows of 3 columns should definitely not be causing any issues. I think your best option is to contact developer suppor with this sample and mention to them that it's running slow for you in the demo version (which is the release version) but that I couldn't notice any slowdown with the latest build. It's possible that something has been addressed, though I can't think of anything that would have caused this. Are there any exceptions being thrown in your code (turn on Debug -> Exceptions -> Throw (for all CLR exceptions)?
No; there are no error messages or exceptions. Other than the code that binds the DataTable to the combo box, there is no code in the form. It's just weird. Becuase when I load a Windows form with a lot of tabs and controls (all native .NET), the form loads instantaneously.
When I load the form with these four controls, it seems to pause and wait when the form is shown (there is a noticeable delay from when you see the form for the first time and when the controls are actually "rendered" (If I can use that term loosely) on it.
Regarding the initial slow load time, the only way around this is to create native images of the Infragistics DLLs on each client machine that you install this on using ngen, which is a utility that comes with the .NET framework (possibly SDK/Visual Studio), as this issue is caused by the JITing of each assembly. Once this is done, you should not see the initial delay in loading each form. I'm not really sure what the best way to run this automatically on a user's machine is when you install your application, but as this is an issue with .NET deployment in general, you might have more luck looking into the Microsoft forums on this matter.
As for your questions regarding the numeric editor, you can limit the number of decimal places by using the MaskInput property and setting it to something like "nnnn.nn". You can find the list of valid masks here, though naturally in this case only the numeric mask characters are valid. If you want to change the tab behavior, look at the TabNavigation property.
I added an MDI form to my application. The first time it loads, it pauses as the controls are initialized. The second time it loads, it is very fast. Is there any way to speed up the form's load event with these controls on it so the user doesn't experience these delays?
I have not used the NGEN.exe utility so I am not familiar with it. Will this affect just the machine that I am developing on? I assume that it will. Is there a way to speed things up once the EXE is deployed to the user? We are going to have lots of forms in this app with many controls on them.
If these forms have similar controls (numeric, date, combo box, etc.), I assume they will load faster once a form with these controls has already loaded, correct?
One last question: I am working with the UltraNumericEditor control. Is there a way to (1) limit the number of decimal places (i.e. to the right of the decimal point? I can't seem to find a property that would limit the number of decimal places. And, on the same control, is there a property you can set so that when the user presses the <TAB> key the cursor moves to the next control (rather than to the decimal place region within the same control)?
Let me try that out and get back to you. In the meantime, when is the NGen.exe utility run? Is this something that I should do on my development machine once? Is this someting that has to be performed on the client machine, too? Or is that not an issue?
Does the delay only happen the first time that you do that? For example, if you open up a second identical form, or possibly close and reopen the form, does it work ok? If so, this is because .NET needs to JIT the Infragistics DLLs into native images so that it can use them, and this is what is causing this pause. It can be bypassed by running ngen.exe on all the Infragistics DLLs.