Specify that fast iteration (with indices) is possible
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 127
- Forks
- 59
- Avg merge
- 23h
- Merged PRs (30d)
- 7
Description
Performance related problem:
Both Mojarra and MyFaces use iterator() for iteration over children. That is very slow if view is big and contains thousands of components.
Specify:
1) Specify : UIComponent.getChildren() is type of java.util.RandomAccess
2) Specify new UIComponent.getFacets(): List (java.util.RandomAccess) for fast iteration over facets
1) is very easy because mojarra and myfaces use ArrayList for children (so does trinidad)
I think this is not implementation detail, because custom renderkits must know that fast iteration is possible
See:
[https://issues.apache.org/jira/browse/MYFACES-3130](https://issues.apache.org/jira/browse/MYFACES-3130)
[http://www.mail-archive.com/dev@myfaces.apache.org/msg52979.html](http://www.mail-archive.com/dev@myfaces.apache.org/msg52979.html)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the UIComponent API and the existing children and facets implementations, then review MYFACES-3130 and the linked mailing-list discussion for compatibility and design context. Verify how Mojarra, MyFaces, and Trinidad currently expose and iterate these collections, and use the project’s existing API tests to confirm the specified fast-iteration contract.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100