| Author |
Share Topic Topic Search Topic Options
|
Matthew
Newbie
Joined: 31-Jul-2007
Posts: 14
|
Post Options
Quote Reply
Topic: Adding Descriptors very slow? Posted: 18-Sep-2007 at 8:41am |
Originally posted by kimj
Linguinut is right - this problem should have been fixed in 3.5.2.x. If you're seeing this problem in this or a later version, please contact support@ideablade.com directly so we can get some more information from you. |
No, it is not happening in a later version, I need to upgrade.
Originally posted by kimj
If you're running a version of DevForce prior to 3.5.2, then maybe it's time to upgrade :). |
It would appear so :)
|
 |
kimj
IdeaBlade
Joined: 09-May-2007
Posts: 1278
|
Post Options
Quote Reply
Posted: 14-Sep-2007 at 6:31pm |
Linguinut is right - this problem should have been fixed in 3.5.2.x. If you're seeing this problem in this or a later version, please contact support@ideablade.com directly so we can get some more information from you.
If you're running a version of DevForce prior to 3.5.2, then maybe it's time to upgrade :).
|
 |
Linguinut
Senior Member
Joined: 14-Jun-2007
Location: United States
Posts: 394
|
Post Options
Quote Reply
Posted: 14-Sep-2007 at 10:25am |
I believe release 3.5.2.2 was supposed to correct this:
#191 . Spurious binder probe failure messages in DebugLog. These no longer occur.
|
 |
Matthew
Newbie
Joined: 31-Jul-2007
Posts: 14
|
Post Options
Quote Reply
Posted: 14-Sep-2007 at 9:53am |
Originally posted by jasonk
Loading assembly doesnt take long. Usually, it's loading data that takes a long time.
Double check your business object, make sure it doesnt bring in many other tables/data. For example, to populate an Employee table using our Tutorial database, it only takes a very short time (only about 9 entries). If I added a TotalRevenue property to the Employee business object, populating Customer table again will take much longer because it will try to iternate all OrderSummaries (about 500) and all OrderDetails (about 2500) and calcuate the TotalRevenue for that Employee.
|
The business object is very simple, I did not add anything to it after it was created using the Object Mapper. It has about 30 simple fields and has 2 related tables that I don't do anything with yet.
Originally posted by jasonk
Another way to isolate the problem, you can assign an empty datasource (e.g. datasource.DataSource = new EntityList<Employee>()) to the controlBindingManager without performing any data query. This will show the pure code loading time.
|
When I do this I see the lag, which coincides with the following in the Trace Viewer: Unable to locate assembly: IdeaBlade.UI.WinForms.DevExpressControls.v2_2_0 for UI binding purposes Unable to locate assembly: IdeaBlade.UI.WinForms.DevExpressControls.v6_1_3 for UI binding purposes Unable to locate assembly: IdeaBlade.UI.WinForms.DevExpressControls.v6_2_2 for UI binding purposes Unable to locate assembly: IdeaBlade.UI.WinForms.DevExpressControls.v6_3_1 for UI binding purposes Unable to locate assembly: IdeaBlade.UI.WinForms.DevExpressControls.v7_1_0 for UI binding purposes Unable to locate assembly: IdeaBlade.UI.WinForms.InfragisticsControls.v6_1 for UI binding purposes Unable to locate assembly: IdeaBlade.UI.WinForms.InfragisticsControls.v6_2 for UI binding purposes Unable to locate assembly: IdeaBlade.UI.WinForms.InfragisticsControls.v7_1 for UI binding purposes Unable to locate assembly: IdeaBlade.UI.WinForms.InfragisticsControls.v5_3 for UI binding purposes
Once I see that in the Trace Viewer, I know I'm home free and I won't see the lag again until the app restarts. I actually created a blank form with a controlbindingmanager at App startup, add 1 descriptor and then destroy it, and my form opens perfectly.
|
 |
jasonk
IdeaBlade
Joined: 14-Aug-2007
Posts: 3
|
Post Options
Quote Reply
Posted: 12-Sep-2007 at 5:41pm |
Loading assembly doesnt take long. Usually, it's loading data that takes a long time.
Double check your business object, make sure it doesnt bring in many other tables/data. For example, to populate an Employee table using our Tutorial database, it only takes a very short time (only about 9 entries). If I added a TotalRevenue property to the Employee business object, populating Customer table again will take much longer because it will try to iternate all OrderSummaries (about 500) and all OrderDetails (about 2500) and calcuate the TotalRevenue for that Employee.
Another way to isolate the problem, you can assign an empty datasource (e.g. datasource.DataSource = new EntityList<Employee>()) to the controlBindingManager without performing any data query. This will show the pure code loading time.
Jason
|
 |
Matthew
Newbie
Joined: 31-Jul-2007
Posts: 14
|
Post Options
Quote Reply
Posted: 12-Sep-2007 at 4:41pm |
|
Ok, I'm pretty sure this gap of time is coming when DevForce is looking to load an assembly containing the DevExpress / Infragistics binding classes, but can't find it (I'm on DevForce Express edition). Next step is to figure out how to turn that off I guess.
Thank you for the help Jason!
|
 |
Matthew
Newbie
Joined: 31-Jul-2007
Posts: 14
|
Post Options
Quote Reply
Posted: 12-Sep-2007 at 3:40pm |
Thanks for your response Jason, This did not really help much, but here are some things I've discovered that may help... 1. It only occurs for this one business object. There doesn't seem to be anything special about this one, but I don't see this problem with others. 2. It doesn't matter if I'm adding 1 Descriptor or 20, its the first one that causes this problem. 3. After this lag occurs, I can close the form then immediately open it, and I don't see the problem again. This is even if I am opening a different Client object. Well, I don't know if those observations help narrow things down, but please let me know if you have any other suggestions. Matt
|
 |
jasonk
IdeaBlade
Joined: 14-Aug-2007
Posts: 3
|
Post Options
Quote Reply
Posted: 11-Sep-2007 at 3:41pm |
Try using BeginInit and EndInit to group all Descriptors.Add together. See if this improves any.
controlBindingManager.BeginInit();
controlBindingManager.BindingSource = dataBindingSource;
controlBindingManager.BoundType = typeof(Model.Customer);
controlBindingManager.Descriptors.Add(new IdeaBlade.UI.WinForms.ControlBindingDescriptor(this.idTextBox, typeof(Model.Customer), "Id"));
controlBindingManager.Descriptors.Add(new IdeaBlade.UI.WinForms.ControlBindingDescriptor(this.companyNameTextBox, typeof(Model.Customer), "CompanyName"));
. . .
controlBindingManager.EndInit();
Jason
|
 |
Matthew
Newbie
Joined: 31-Jul-2007
Posts: 14
|
Post Options
Quote Reply
Posted: 08-Sep-2007 at 11:26am |
|
I did a quick search about this, and didn't see anything.
In my DevForce app, I have a Detail Form that has a ControlBindingManager that displays all the fields of a Client object. I noticed that it was taking a long time for this form to display, sometimes upwards of 2 seconds from button click to the form showing. And this is happening when I run the app directly, not through the Debugger.
Narrowing it down a bit, it seems that the bulk of the time (about 1.3 secs out of 2) is spent in a method that does nothing but the following x10 or so fields: this.ClientsCBM.Descriptors.Add(new IdeaBlade.UI.WinForms.ControlBindingDescriptor(this.addressTextBox, typeof(MyApp.Client), "Address"));
This happens on all the machines I've tested it on, including some much faster than our customers will have.
The trip to the database, filling in the cache with Client objects, creating EntitlyLists, and initializing the bindingsources, etc all happen quite quickly. It is only when I add these descriptors that the slow down appears.
Is there another way to add these descriptors, or does anyone have any suggestions on how to speed this process up?
Thanks, Matt
|
 |