Hmm, that's not too good. I was not using TreeSet for uniqueness, but for
O(ln n) lookup. A sorted array/list works just as well, but an unsorted one
is a performance killer with O(n) lookup speed.

On Nov 21, 2007 11:32 AM, Scott O'Bryan <[EMAIL PROTECTED]> wrote:

> I had to re-do the patch to BrigdgeImpl because something was very
> messed up there.  As a result, I actually changed this to a List rather
> then a Set.  The reason is that the enumeration which fills the array
> is, by contract, unique so there is no reason to check for uniqueness.
> One thing I *DIDN'T* do is use the Collections.list which I forgot
> about, so that may even make things faster or, at the very least, put
> the ownis for performance on the JDK which I'm all about.  :)
>
> Simon Lessard wrote:
> > Ok, thanks. I saw the Vector as well but didn't want to evaluate if
> > synchronization was really required or not. It seems it wasn't. I'm
> > going to check the new version to see if you included some of the
> > other possible optimizations I saw but didn't work on. The only one I
> > could not skip though was the use of an unsorted array for the
> > exclusion list. I replaced that with a TreeSet to get O(ln n) access
> > time rather than O(n).
> >
> > ~ Simon
> >
> > On Nov 20, 2007 7:22 PM, Scott O'Bryan (JIRA) <dev@myfaces.apache.org
> > <mailto:dev@myfaces.apache.org>> wrote:
> >
> >
> >         [
> >
> https://issues.apache.org/jira/browse/PORTLETBRIDGE-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> >     <
> https://issues.apache.org/jira/browse/PORTLETBRIDGE-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> >
> >     ]
> >
> >     Scott O'Bryan resolved PORTLETBRIDGE-6.
> >     ---------------------------------------
> >
> >        Resolution: Fixed
> >
> >     Hey Simon, I fixed the few issues you had and added a couple more
> >     small optimization (including replacing uses of Vector with a
> >     List).  That patch was very complete and very well done.  Thanks...
> >
> >     > JDK 1.5 Functionality
> >     > ---------------------
> >     >
> >     >                 Key: PORTLETBRIDGE-6
> >     >                 URL:
> >     https://issues.apache.org/jira/browse/PORTLETBRIDGE-6
> >     >             Project: MyFaces Portlet Bridge
> >     >          Issue Type: Improvement
> >     >          Components: General
> >     >    Affects Versions: 1.0.0-SNAPSHOT
> >     >            Reporter: Scott O'Bryan
> >     >            Assignee: Simon Lessard
> >     >         Attachments: PORTLETBRIDGE-6.patch
> >     >
> >     >
> >     > The bridge was originally coded to the JDK1.4 standard.  Since
> >     JSF1.2 requires JDK5, we should follow the JDK5 standards for
> >     speed and reliability.  Most notibly:
> >     > * Specify generics wherever possible - especially in the
> >     ExternalContext implementations which use this by default
> >     > * Remove the SimpleStringBuilder class in impl and replace it's
> >     usage with StringBuilder
> >
> >     --
> >     This message is automatically generated by JIRA.
> >     -
> >     You can reply to this email to add a comment to the issue online.
> >
> >
>
>

Reply via email to