----- Original Message -----
From: "James Taylor" <[EMAIL PROTECTED]>


> My tactics were slightly different since I wanted to not change the
> signature of any existing methods (DynamicURI is intended to be
> extended), and I did not want to use commons-httpclient since it would
> still require string copying (this implementation writes each encoded
> character directly to the output).

I would still advise you to be nice with the stringbuffer allocation
then....it is not so minor...

> That said, I'm mostly amicable to all the changes in your patch
> (although LinkedList is probably more appropriate than ArrayList).
> Anybody else have an opinion?

The list is short (10 elements maybe max in a query data...maybe 20). So
that's not big deal.
Accessing elements by index in linkedlist is more expensive than in
arraylist, quite normal.
There is no need to create an iterator for traversing. link is good enough.
Since DynamicURI is normally recycled the arraylist grows generally up to
the max size of elements for good.

If you want some insight at arraylist vs linkedlist, see
http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.html?page=2





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to