[MDSAL-613] Add DOMQuerySpliterator Created: 28/Oct/20  Updated: 28/Oct/20

Status: Confirmed
Project: mdsal
Component/s: DOM runtime
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: Searchable MD-SAL

 Description   

LazyDOMQueryResult is an Iterable and is using the default IteratorSpliterator. Since we expeect to be used mostly with streams, prefer to add DOMQuerySpliterator and build the DOMQueryIterator as a very simple shim.

This should bias us more towards streaming cases, as we end up allocating fewer objects for streams. It also allows us to communicate important properties, i.e. distinct, nullable, immutable.

The cost for iteration users would be allocation of another two objects (backing spliterator and a lambda), but that is fine.

Remember that things like forEachRemaining() can be forwarded as well.


Generated at Wed Feb 07 20:10:14 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.