dev@javaserverfaces.java.net

Re: Review: Initial Fixes for Issue 125

From: Jacob Hookom <jacob_at_hookom.net>
Date: Sat, 02 Jul 2005 15:41:54 -0500

Thanks, the one problem is that the returned iterator must be immutable,
and I will have to double check to make sure the child list and facet
map iterators are immutable before making that change.

I will also go ahead and modify Facet storage as you recommend, SAX
parsers work the same way to avoid object creation.

Updating the changebundle shortly, if I can get another RI member to
verify the changes, then I want to start in on the JSF-Impl Renderers,
etc. I also want to take a look at optimizing the ByteArrayGuard once
issue #137 is committed.

As a side note, I also committed changes to CompositeELResolver in
glassfish which will not create an Iterator for each method call.

-- Jacob

Adam Winer wrote:

>Jacob,
>
>Great to see some optimizing of this code - getFacetsAndChildren()
>is desperately in need of it - but the new getFacetCount()
>API's got to be brought over to the EG. Where I'll +1 it.
>
>Also, you could optimize getFacetsAndChildren() further
>to deal with the common scenarios of children but no
>facets or facets but no children:
> if (getFacetCount() == 0) {
> if (getChildCount() == 0) { return EMPTY_ITERATOR };
> return getChildren().iterator();
> }
> else if (getChildCount() == 0) {
> return getFacets().values().iterator();
> }
> else {
> ... old code ...
> }
>
>...saving a whopping one object allocation, but it does
>add up with all the tree walking we do.
>
>And state saving could be further optimized by saving
>facets as alternating name/state pairs in the array, instead
>of an array of two-element arrays.
>
>-- Adam
>
>
>
>-----Original Message-----
>>>From Jacob Hookom <jacob_at_hookom.net>
>Sent Sat 7/2/2005 7:50 AM
>To dev_at_javaserverfaces.dev.java.net
>Subject Review: Initial Fixes for Issue 125
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>
>
>


-- 
Jacob Hookom - Minneapolis
--------------------------
http://hookom.blogspot.com