performance problem in MSChart DataPointCollection.Clear() - by selfcomposed

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


4
0
Sign in
to vote
ID 596212 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 9/8/2010 12:42:25 PM
Access Restriction Public

Description

The MSChart DataPointCollection.Clear() method is quite slow, taking about 5 seconds to delete 70k elements.  It calls ClearItems(), which removes items from the *beginning* of the list until the list is empty. 

protected override void ClearItems()
{
    this.SuspendUpdates();
    while (base.Count > 0)
    {
        this.RemoveItem(0);
    }
    this.ResumeUpdates();
}
Sign in to post a comment.
Posted by Pablo1397 on 8/8/2012 at 3:40 AM
For better performance Microsoft has to code in the class "ChartElementCollection<T>"

protected override void ClearItems()
{
    this.SuspendUpdates();
    while (base.Count > 0)
    {
        this.RemoveItem(base.Count - 1);
    }
    this.ResumeUpdates();
}
Posted by Microsoft on 2/3/2011 at 11:27 PM
Thank you for reporting this issue. At this time, we do not have plans to address this issue

-Sean
Posted by Microsoft on 9/8/2010 at 5:02 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)