[prev in list] [next in list] [prev in thread] [next in thread] 

List:       soap-dev
Subject:    Re: [PATCH] Improve Key mapping
From:       Scott Nichol <snicholnews () scottnichol ! com>
Date:       2002-10-30 14:57:53
[Download RAW message or body]

Pavel,

I've just committed some changes including those that you propose.  As
always, thanks for your contribution.

Scott Nichol

----- Original Message -----
From: "Pavel Ausianik" <Pavel_Ausianik@epam.com>
To: "Pavel Ausianik" <Pavel_Ausianik@epam.com>;
<soap-dev@xml.apache.org>
Sent: Tuesday, October 29, 2002 12:04 PM
Subject: [PATCH] Improve Key mapping


> Hello,
>
> XMLJavaMappingRegistry.getKey function uses Class.toString(), which is
not
> efficient and causes StringBuffer allocation, then expand, since
original
> size is not enough. In the same time for using as key it is enough to
use
> class name.
>
> The Class.toString function is following (from SUN's SDK 1.3.1)
>
>     public String toString() {
>         return (isInterface() ? "interface " : (isPrimitive() ? "" :
"class
> "))
>             + getName();
>     }
>
> I just created separated getKey functions for Class and QName, and
added
> special case for null values. It is saved me about 10% of all char[]
> allocated (only memory usage was tracked)
>
>
> Best regards,
> Pavel
>
>


------------------------------------------------------------------------
--------


> --
> To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <mailto:soap-dev-help@xml.apache.org>


--
To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-dev-help@xml.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic