On Sun, Apr 5, 2009 at 12:06 AM, Thorsten Scherler <[email protected]>wrote:

> On Fri, 2009-04-03 at 19:30 +0800, Mingfai wrote:
>
> Hi Mingfai,
>
> since you are starting to get a usual poster here :) please to not
> top-post in the future. Why?
>
> http://www.caliburn.nl/topposting.html
> http://en.wikipedia.org/wiki/Posting_style
>
> "A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?"
>

thx. didn't aware i posted like barbarian. :-)



>
> > well.. to backup my claim that creating instance has no difference in
> > performance, i did a profiling+benchmark base on the test case that i
> > have attached to the JIRA issue.
>
> I am not going in depth here but the problem with this test is that they
> do not include GC. GC is taking up resources to be performed. If you
> create lots of instances the GC will have to kick in earlier then later
> (and more often) each time it will produce a performance leak while
> doing the GC.
>
> Further in many classes creating an instance is related to do the heavy
> stuff only once. In our case there is no heavy lifting involved.


exactly. I did check the GC graph during the profiling and there was nothing
worth to mention. I think it went up and down by 1M.



>
>
> Your test are:
>
> 1) new LinkResolver(base, "/index.html").resolve().toString();
> 2) LinkResolver.staticResolve(base, null).toString();
>
> I thought of:
>
> LinkResolver resolver = new LinkResolver (base);
> resolver.resolve(linkPart);
> resolver.resolve(linkPart2);
> ....


this is better! i'm going to change my local version to this style. The
LinkResolver could be reused to resolve multiple link.



>
>
> Thanks for your feedback and your contributions let us now see how to
> best incorporate them in droids.
>
> salu2
> --
> Thorsten Scherler <thorsten.at.apache.org>
> Open Source <consulting, training and solutions>
>
>

Reply via email to