You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Sung-Gu <je...@apache.org> on 2003/07/12 07:57:07 UTC

Re: [SURVEY] Commons-URI or not? - about some upgrades!

Anton,

----- Original Message ----- 
From: "Anton Tagunov" <at...@mail.cnt.ru>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Monday, June 30, 2003 5:00 PM
Subject: Re: [SURVEY] Commons-URI or not?


> Hello Sung-Gu!
> 
> SG> I suggest that jakarta-commons provides flexible URI issue implementations
> SG> as a package.
> 
> Looking forward to see it appear in jakarta-commons. :-)
> 
> BTW, do you think that (char[] data, int start, int len)
> versions of methods should be included?
> 
> (Something that I'm probably doing in now for myself)
> 
> A recent test that I have carried out showed that .charAt() is
> 1.8 - 1.9 times slower then [] on a char array, just in case I attach
> the test case. This happens because with char[] I believe each char
> takes two bytes, while with String they have UTF8 and probably
> have to travel the whole string from the beginning to find charAt(i).

I see, I believe you. And I saw your test reult also. ;)
 
> It will be true if someone here will say that it will be premature
> optimization, but if someone is mad enough :) launch a new project
> for URI-s why not think of this also?
> 
> Then, it would probably be worth looking into Tomcat internals.
> I believe they should some code of that kind internally too
> (they have to parse URI-s). I believe they should be using
> the char[] versions. Indeed some documentation even on Tomcat 3 said
> that they have found the .stratsWith() and co functions to be
> to slow. This means they've found found a way to speed it up.
> How? I believe they have switched to char[] (don't see other way
> to speed up).
> 
> Is this project going to be to ambitious to become a dependency
> both for HttpClient and for Tomcat? :-))
> 
> Anyway, even if it does not become one, it would be good to
> a code of equal quality in it.
> 
> WBR, Anton
> 
> P.S. Just a side-note (the overall ideal of the subproject
> is very much welcomed :) is there going to be any overlap with
> the code project in coding/decoding the uri-s?
> 
> HttpClient have just donated something there..
> 
> And there are some
> EscapeUtils in lang, aren't there?

Really?  I haven't seen that yet... --a


When I try the package as commons-uri at sandbox, I'll look into those your comments.

Thank you for all your comments,

Sung-Gu

P.S.:  I'm always very late to check e-mails... ^^;