Observable{List/Set/Map}Wrapper.retainAll/removeAll can be optimized for some edge cases.
removeAll(c):
This is a no-op if 'c' is empty.
retainAll(c):
This is a no-op if the backing collection is empty, or equivalent to `clear` if 'c' is empty.
The implementation should be improved to detect these situations and skip potentially expensive operations like an enumeration of the backing collection (in the case of no-ops).
removeAll(c):
This is a no-op if 'c' is empty.
retainAll(c):
This is a no-op if the backing collection is empty, or equivalent to `clear` if 'c' is empty.
The implementation should be improved to detect these situations and skip potentially expensive operations like an enumeration of the backing collection (in the case of no-ops).