Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332367 - [DataBinding] Performance of (WritableList|SimplePropertyObservableMap)#clear()
Summary: [DataBinding] Performance of (WritableList|SimplePropertyObservableMap)#clear()
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Ovidio Mallo CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2010-12-11 14:19 EST by Ovidio Mallo CLA
Modified: 2011-01-31 16:09 EST (History)
2 users (show)

See Also:


Attachments
patch (4.90 KB, patch)
2010-12-23 18:25 EST, Ovidio Mallo CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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