See #489 for the initial bug which started this PR.
This PR includes changes to support efficient iteration and search through collections in multiple APIs where incorrect usage of collections and unmodifiable views could cause severe performance issues for large numbers of elements.
Also, this adds an UnmodifiableTraverseableCollectionView to help support the use cases.
Related Issue(s)
Fix #489
Testing
Added a new benchmark that (practically) never finishes pre-fix for #489, but now finishes quickly
Added unit tests for UnmodifiableTraverseableCollectionView and TraverseableCollection
Existing unit tests cover functionality
Backwards-compatibility
Is this a breaking change that will not be backwards-compatible? If yes, how so?
Only performance changes should be visible in existing APIs.
Documentation
Does the change require any updates to documentation? If so, where? Are they included?
Description & Motivation
See #489 for the initial bug which started this PR.
This PR includes changes to support efficient iteration and search through collections in multiple APIs where incorrect usage of collections and unmodifiable views could cause severe performance issues for large numbers of elements.
Also, this adds an
UnmodifiableTraverseableCollectionView
to help support the use cases.Related Issue(s)
Fix #489
Testing
UnmodifiableTraverseableCollectionView
andTraverseableCollection
Backwards-compatibility
Only performance changes should be visible in existing APIs.
Documentation
No