Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-613

Add DOMQuerySpliterator

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • DOM runtime

      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.

            Unassigned Unassigned
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: