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" <[EMAIL PROTECTED]>
To: "Pavel Ausianik" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
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>

Reply via email to