Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332367

Summary: [DataBinding] Performance of (WritableList|SimplePropertyObservableMap)#clear()
Product: [Eclipse Project] Platform Reporter: Ovidio Mallo <mallo.ovidio>
Component: UIAssignee: Ovidio Mallo <mallo.ovidio>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, qualidafial
Version: 3.6.1Keywords: performance
Target Milestone: 3.7 M6   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch none

Description Ovidio Mallo CLA 2010-12-11 14:19:32 EST
The clear() methods of the WritableList and SimplePropertyObservableMap classes do not perform well for larger lists.

In WritableList the problem is that the wrapped list is not just cleared but its elements are removed through an iterator one at a time (at the front, which imposes some additional overhead).

In SimplePropertyObservableMap the clear() method is not implemented and the base implementation implements it by iterating through the entry set and removing every entry individually.
Comment 1 Ovidio Mallo CLA 2010-12-23 18:25:35 EST
Created attachment 185797 [details]
patch
Comment 2 Ovidio Mallo CLA 2011-01-03 12:23:48 EST
Matthew, +1?
Comment 3 Boris Bokowski CLA 2011-01-27 11:37:22 EST
Moving to M6 (this week is M5 milestone week and we should be done with M5 work by now).
Comment 4 Matthew Hall CLA 2011-01-27 23:24:06 EST
+1
Comment 5 Ovidio Mallo CLA 2011-01-31 16:09:31 EST
Thanks, Matthew!

Released to HEAD > 20110131