StrataFrame Forum

Infragistics ListView Performance

http://forum.strataframe.net/Topic5557.aspx

By Larry Caylor - 1/3/2007

Welcome back! Hope you guys had a great holiday season.

 

Now that I'm starting to use the Infragistics wrapper more, I've run into a performance issue with the UltraListView control.  I’m populating it by copying from and existing BO. If the ListView is populated on FormLoad the performance is great, very similar to the existing MicroFour ListView control. However if I populate it using the Requery() method, performance is awful.

 

Hopefully I've just missed something in the UltraListView configuration but I can’t think of what it might be. Attached is a sample project that shows the problem.

 

-Larry

By StrataFrame Team - 1/4/2007

OK, I did some probing through the Infragistics DLLs and the completely ignore the BeginUpdate() and EndUpdate() methods with respect to the property change notifications.  It doesn't paint the control until the EndUpdate() is called, but each time you set a value on one of the list view items, it goes through a huge list of methods that validate the list view item and all of it's subitems... including the position of the controls and such.  So, when the control is not visible (the first time it loads), it loads very quickly, because those property change methods are ignored.  But, once it's visible, the methods slow down the population quite drasticly.

So, I worked the population around so that the list view items are not created until the array of all of the display values has been created (after the RowPopulating event is fired).

It sped up the process quite a lot on this end.  Let me know how it works and I'll get it into the next build.

EDIT: Attachment moved to post below...

By Larry Caylor - 1/4/2007

That did the trickBigGrin Thanks for the quick fix!

-Larry

By StrataFrame Team - 1/4/2007

Not a problem Smile  I guess I never populated it with enough records during testing to notice the slowness...
By Larry Caylor - 1/4/2007

It’s fast now but I just found small bug. The re-designed population method is failing to populate the item Tag value which I’m using to seek to the record the user selects from the list.

-Larry

By StrataFrame Team - 1/4/2007

Yes, sir, you are correct Smile
By Larry Caylor - 1/4/2007

Once again thanks for the quick turn around. You guys are greatCool  My ListViews are screamingly fast now and you saved me from having to re-do half a dozen forms.

 

While on the subject of Infragistics, I’m also using the UltraComboEditors and discovered a very minor quirk. Since I can work around it in code there’s no hurry to fix it, if it is a bug. A standard unbound SF combobox populated by a BO on FormLoad will display the TopMostItem when the form loads. An UltraComboEditor also unbound, populated by a BO, and set to populate on FormLoad does not display the TopMostItem and requires something like

 

Me.cboUpdatedBy.Value = Me.cboUpdatedBy.TopMostItem.TopMostValue

 

in the form load event.

 

-Larry