Bug 571736 - [Databinding] Clearing an empty list should be a no-op
Summary: [Databinding] Clearing an empty list should be a no-op
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.20   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-05 13:46 EST by Christoph Laeubrich CLA
Modified: 2021-12-29 16:56 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Laeubrich CLA 2021-03-05 13:46:37 EST
Currently a clear() triggers a change event even if the list is empty.
For me it seem that fireListChange should check if the diff is empty and simply return in this case.

The same applies to maps, set, ... as well.

This is not only a performance problem but can easily lead to a situation of infinite loop when using SideEffects. e.g if one wants to clear the list and put some new items into it.