Hi, I work for spillman Technologies and we are using your infragistics2.win.v7.3 etal in one of our products. We have noted that it takes a long time for our application to close, so profiled the application to see the hot spots while closing.
We think it has been narrowed down to your code.
We have a class which extends UltraToolbarsManager, in which we override Dispose:
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (this.Toolbars != null) { this.Toolbars.Clear(); } if (this.Tools != null) { this.Tools.Clear(); } } }
When the call to this.Toolbars.Clear() happens, it takes a long time without ever calling back into our code, but seeming to delve deep into size/position calculations. I have tried commenting out our dispose override, but the closure still takes a long time, getting into infragistic resize code by another path... this is ironic because we obviously don't care the size or any other visual feature while our application closes.
The toolbar is on an mdi form.
Here is a screenshot from the profiler:
I have tried various tricks including wrapping the dispose method in Begin/EndEdit, wrapping the dispose of the MDI form in SuspendLayout, and so on. All to no avail.
Is there any particular reason that you're clearing the Toolbars collection? This will cause any listeners to recalculate their metrics when the toolbars are removed from the dock areas. You could try simply calling Dispose on the Toolbars, assuming that they're not already disposed by the call to the base class. I also think that the call to Tools.Clear is unnecessary since the UltraToolbarsManager will dispose this collection itself.
-Matt
This is what happens when we don't interfere in the dispose process. The same performance problem with a very similar cause, something to do with resizing the toolbars.
Did you try wrapping a BeginUpdate and EndUpdate around the TabbedMdiManager? It seems like it's still trying to respond to the various toolbars being removed from the collection/dock area. If you can post a simple sample project, I could take a look at it. Alternatively, you could contact Developer Support regarding this issue to see if they have any insight. I would first recommend that you ensure that you have the latest hotfix, in case this issue has already been addressed.
I installed the latest hotfix and tried wrapping the dispose in begin/endupdate. The problem is still present. I've sent a support request... I'll have to look into making a sample project, it may take a lot of effort.
Thanks for you help so far!