BusinessBindingSource.vb > ClearBusinessObjectList causing slow form close


Author
Message
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Glad to hear that Peter.

Sorry for the misunderstanding. I got the idea you were suggesting that the .Dispose should be moved outside the loop. Wink

Peter Jones
Peter Jones
Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Ivan,



We have a solution to our problem - so no urgency for any changes in the SF area. Rather than use a BO to populate the Pivot Grid we now use the BO's data table. The following code has been added just after the refresh of the BO using the current data selection criteria (dtForPivotGrid is a data table).



dtForPivotGrid = Me.BoHPCForPivot1.CurrentDataTable



Me.PivotGridControl1.DataSource = dtForPivotGrid



Me.BoHPCForPivot1.Clear()



This change has had an enormous impact. The form close is now instant but the time it takes to refresh the Pivot Grid has also been dramatically reduced. When the Pivot Grid used the BO refreshing it with (say) 200,000 records took about 4 minutes. Now the BO's data table is used (rather than the BO object itself) the Pivot Grid refresh just takes around 15 seconds.



Cheers, Peter
Peter Jones
Peter Jones
Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Ivan,



I wan't proposing a solution - I was just bringing what I thought to a bug to your attention.



Are you saying it is 'by design' and we have to live with it?



Cheers, Peter
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)Strategic Support Team Member (3.6K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Peter.

I have a feeling your solution wouldn't work, as the BBS IBindingList interface expects a unique instance of an object for each row instance, that is why you have seem the BO for each instance being disposed.

Peter Jones
Peter Jones
Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)Advanced StrataFrame User (520 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi,



We have just added a (DevExpress) Pivot Grid control to an app and a user reported very slow form closing (2+ minutes) when he had a fair amount of data in the Pivot Grid (50,000 rows).



On closer investigation we see this is also the case in a normal Devexpress Grid. We hadn't noticed this before because our users would rarely have more than 2 or 3,000 rows in a grid - generally just a few hundred.



In tracking down the issue we see that it's in BusinessBindingSource > ClearBusinessObjectList. Please see the attached to screen shots:



SF_Dispose_01 - here the code is disposing of a BO (for a Pivot Grid) with 2826 rows in the grid.

SF_Dispose_02 - here the code is disposing of a BO (for normal Grid) with 23664 rows in the grid.



The problem is that line 244 is executed for every row in the BO rather than once for the BO.



We are using SF 1.7.0.7 in a VS2010 development environment.



This is proving to be a real nuisance for our user so, if possible, an early fix would be appreciated - even if it mean having to change our copy of the source code ourselves until a more formal fix is provided in a new release.



Attachments
SF_Dispose01.jpg (152 views, 129.00 KB)
SF_Dispose02.jpg (154 views, 316.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search