G
G. Tarazi
Hi
Create a schema using vs.net with 100 text fields, simple fields with the name of A00 to A99
Create an InfoPath form using VS.NET 2003 SP1 C#, and import that schema to the form.
Create a c# event handler (on after change) for each filed, and keep it with the default code.
Compile and publish the form, then disable the event handlers (by commenting them) and recompile and publish the form with a new name.
Publish it to the desktop
Double click on the first published form, and then on the second published form.
The one with the C# event handlers, will eat the CPU speed, on a 3GHz Intel, 1GB ram for 2 seconds, and then will open.
The one with the event handlers disabled will not do that.
Repeat the entire test with a form with Java Script, you will be amazed from the results, the form will open instantly.
Now my problem is when there is code inside these event handlers, in my real world form, the form talks about 15-20 seconds full CPU speed at 100 present on the same machine, when double clicked before it opens.
And that just because there is code inside the event handlers and that code is written in a way not to be called during startup, and I verified that function by function the past 2 days.
If I comment half of them, the seeped will increase to the half. (7-10sec 100% cpu)
Why?
I am just not getting it, why it is happening? Why that form eats the CPU speed when it's C# and not doing it when Jscript?
Thank you
Create a schema using vs.net with 100 text fields, simple fields with the name of A00 to A99
Create an InfoPath form using VS.NET 2003 SP1 C#, and import that schema to the form.
Create a c# event handler (on after change) for each filed, and keep it with the default code.
Compile and publish the form, then disable the event handlers (by commenting them) and recompile and publish the form with a new name.
Publish it to the desktop
Double click on the first published form, and then on the second published form.
The one with the C# event handlers, will eat the CPU speed, on a 3GHz Intel, 1GB ram for 2 seconds, and then will open.
The one with the event handlers disabled will not do that.
Repeat the entire test with a form with Java Script, you will be amazed from the results, the form will open instantly.
Now my problem is when there is code inside these event handlers, in my real world form, the form talks about 15-20 seconds full CPU speed at 100 present on the same machine, when double clicked before it opens.
And that just because there is code inside the event handlers and that code is written in a way not to be called during startup, and I verified that function by function the past 2 days.
If I comment half of them, the seeped will increase to the half. (7-10sec 100% cpu)
Why?
I am just not getting it, why it is happening? Why that form eats the CPU speed when it's C# and not doing it when Jscript?
Thank you