You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Jon Scott Stevens <jo...@latchkey.com> on 2002/02/19 02:22:51 UTC

[patch] catalina base64, optimizations and code cleanup

Enclosed is a patch where I did a bunch of code cleanup and minor
optimizations, switched to the catalina Base64 (note the one FIXME, if
someone has a suggestion for a better way, let me know).

There is more to come, but this is a good start...

-jon


Re: [patch] catalina base64, optimizations and code cleanup [off list]

Posted by John Wilson <tu...@wilson.co.uk>.
Apologies to all - this was intended to be an off list reply.

I'm *really*  embarrassed to have screwed this up.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Re: [patch] catalina base64, optimizations and code cleanup [off list]

Posted by John Wilson <tu...@wilson.co.uk>.
Apologies to all - this was intended to be an off list reply.

I'm *really*  embarrassed to have screwed this up.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Re: [patch] catalina base64, optimizations and code cleanup [off list]

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 2/19/02 2:12 PM, "John Wilson" <tu...@wilson.co.uk> wrote:

> I seem to have offended Jon - I'm trying, off list, to sort this out. I'm
> sorry if I have cause problems - it was not my intention.

You have not offended me.

-jon


Re: [patch] catalina base64, optimizations and code cleanup [off list]

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 2/19/02 2:12 PM, "John Wilson" <tu...@wilson.co.uk> wrote:

> I seem to have offended Jon - I'm trying, off list, to sort this out. I'm
> sorry if I have cause problems - it was not my intention.

You have not offended me.

-jon


Re: [patch] catalina base64, optimizations and code cleanup [off list]

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Daniel Rall" <dl...@finemaltcoding.com>
To: <rp...@xml.apache.org>
Sent: Tuesday, February 19, 2002 9:02 PM
Subject: Re: [patch] catalina base64, optimizations and code cleanup


> "John Wilson" <tu...@wilson.co.uk> writes:
>
> >> At CollabNet, we aren't passing binary data around over XML-RPC, so
> >> we won't be hitting that code.
> >
> > Yes, but surely Apache XML-RPC is being developed and supported for a
wider
> > audience than CollabNet. Or have I misunderstood something?
>
> No, you have not.
>

Thanks for the reassurance.

I seem to have offended Jon - I'm trying, off list, to sort this out. I'm
sorry if I have cause problems - it was not my intention.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Re: [patch] catalina base64, optimizations and code cleanup [off list]

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Daniel Rall" <dl...@finemaltcoding.com>
To: <rp...@xml.apache.org>
Sent: Tuesday, February 19, 2002 9:02 PM
Subject: Re: [patch] catalina base64, optimizations and code cleanup


> "John Wilson" <tu...@wilson.co.uk> writes:
>
> >> At CollabNet, we aren't passing binary data around over XML-RPC, so
> >> we won't be hitting that code.
> >
> > Yes, but surely Apache XML-RPC is being developed and supported for a
wider
> > audience than CollabNet. Or have I misunderstood something?
>
> No, you have not.
>

Thanks for the reassurance.

I seem to have offended Jon - I'm trying, off list, to sort this out. I'm
sorry if I have cause problems - it was not my intention.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk


Re: [patch] catalina base64, optimizations and code cleanup

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"John Wilson" <tu...@wilson.co.uk> writes:

>> At CollabNet, we aren't passing binary data around over XML-RPC, so
>> we won't be hitting that code.
>
> Yes, but surely Apache XML-RPC is being developed and supported for a wider
> audience than CollabNet. Or have I misunderstood something?

No, you have not.

Re: [patch] catalina base64, optimizations and code cleanup

Posted by Daniel Rall <dl...@finemaltcoding.com>.
"John Wilson" <tu...@wilson.co.uk> writes:

>> At CollabNet, we aren't passing binary data around over XML-RPC, so
>> we won't be hitting that code.
>
> Yes, but surely Apache XML-RPC is being developed and supported for a wider
> audience than CollabNet. Or have I misunderstood something?

No, you have not.

Re: [patch] catalina base64, optimizations and code cleanup

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 2/19/02 12:46 PM, "John Wilson" <tu...@wilson.co.uk> wrote:

>> My decision to use Catalina' code is based entirely on the fact that
>> Catalina is *by far* the most used piece of software on Jakarta. Something
>> like 100-200,000 downloads/week. If the Base64 implementation sucked, it
>> would have been discovered a long time ago.
> 
> We have discoverd over the years that the performance of XML-RPC can be
> quite difficult to predict - for some reason some XML parsers perform very
> badly and yet they are perfectly good XML parsers.

When did I mention that we were talking about a parser?

> Sorry - Open Source licencing theology is not one of my passions;)

It has nothing to do with that. It is 100% about legalities.

> MinML-RPC (from http://www.wilson.co.uk) has a Base64 module which performs
> pretty much as well as the old one in the Helma implementation (I have used
> Hannes' benchmarks on both implementations - sometime I win sometimes,
> Hannes wins!). MinML-RPC is released under a BSD licence and you are most
> welcome to take what you would like from the code base.

Q: Does it output a char[] or a byte[] from the decode() method?

> Yes, but surely Apache XML-RPC is being developed and supported for a wider
> audience than CollabNet. Or have I misunderstood something?

I await your patches.

-jon

-- 
Standard rules apply: Ask any questions, and you get the job. ;-)


Re: [patch] catalina base64, optimizations and code cleanup

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 2/19/02 12:46 PM, "John Wilson" <tu...@wilson.co.uk> wrote:

>> My decision to use Catalina' code is based entirely on the fact that
>> Catalina is *by far* the most used piece of software on Jakarta. Something
>> like 100-200,000 downloads/week. If the Base64 implementation sucked, it
>> would have been discovered a long time ago.
> 
> We have discoverd over the years that the performance of XML-RPC can be
> quite difficult to predict - for some reason some XML parsers perform very
> badly and yet they are perfectly good XML parsers.

When did I mention that we were talking about a parser?

> Sorry - Open Source licencing theology is not one of my passions;)

It has nothing to do with that. It is 100% about legalities.

> MinML-RPC (from http://www.wilson.co.uk) has a Base64 module which performs
> pretty much as well as the old one in the Helma implementation (I have used
> Hannes' benchmarks on both implementations - sometime I win sometimes,
> Hannes wins!). MinML-RPC is released under a BSD licence and you are most
> welcome to take what you would like from the code base.

Q: Does it output a char[] or a byte[] from the decode() method?

> Yes, but surely Apache XML-RPC is being developed and supported for a wider
> audience than CollabNet. Or have I misunderstood something?

I await your patches.

-jon

-- 
Standard rules apply: Ask any questions, and you get the job. ;-)


Re: [patch] catalina base64, optimizations and code cleanup

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Jon Scott Stevens" <jo...@latchkey.com>
To: <rp...@xml.apache.org>
Sent: Tuesday, February 19, 2002 8:03 PM
Subject: Re: [patch] catalina base64, optimizations and code cleanup


[snip]

> My decision to use Catalina' code is based entirely on the fact that
> Catalina is *by far* the most used piece of software on Jakarta. Something
> like 100-200,000 downloads/week. If the Base64 implementation sucked, it
> would have been discovered a long time ago.

We have discoverd over the years that the performance of XML-RPC can be
quite difficult to predict - for some reason some XML parsers perform very
badly and yet they are perfectly good XML parsers.

>
> That said, we *have* to get rid of the LGPL one. We just can't have that
in
> CVS. It was a terrible idea to spend time tuning it. It should have been
> swapped out a long time ago.

Sorry - Open Source licencing theology is not one of my passions;)
>
> Note, I did introduce a potential bottle neck in the xmlrpc code in that
in
> one case, I had to allocate a String in order to convert from byte[] to
> char[]. If you are willing to write an implementation of Base64 that
outputs
> a char[] directly (like the GPL one did), that would be great.

MinML-RPC (from http://www.wilson.co.uk) has a Base64 module which performs
pretty much as well as the old one in the Helma implementation (I have used
Hannes' benchmarks on both implementations - sometime I win sometimes,
Hannes wins!). MinML-RPC is released under a BSD licence and you are most
welcome to take what you would like from the code base.


> At CollabNet, we aren't passing binary data around over XML-RPC, so we
won't
> be hitting that code.

Yes, but surely Apache XML-RPC is being developed and supported for a wider
audience than CollabNet. Or have I misunderstood something?

John Wilson
The Wilson Partnership
http://www.wilson.co.uk




Re: [patch] catalina base64, optimizations and code cleanup

Posted by John Wilson <tu...@wilson.co.uk>.
----- Original Message -----
From: "Jon Scott Stevens" <jo...@latchkey.com>
To: <rp...@xml.apache.org>
Sent: Tuesday, February 19, 2002 8:03 PM
Subject: Re: [patch] catalina base64, optimizations and code cleanup


[snip]

> My decision to use Catalina' code is based entirely on the fact that
> Catalina is *by far* the most used piece of software on Jakarta. Something
> like 100-200,000 downloads/week. If the Base64 implementation sucked, it
> would have been discovered a long time ago.

We have discoverd over the years that the performance of XML-RPC can be
quite difficult to predict - for some reason some XML parsers perform very
badly and yet they are perfectly good XML parsers.

>
> That said, we *have* to get rid of the LGPL one. We just can't have that
in
> CVS. It was a terrible idea to spend time tuning it. It should have been
> swapped out a long time ago.

Sorry - Open Source licencing theology is not one of my passions;)
>
> Note, I did introduce a potential bottle neck in the xmlrpc code in that
in
> one case, I had to allocate a String in order to convert from byte[] to
> char[]. If you are willing to write an implementation of Base64 that
outputs
> a char[] directly (like the GPL one did), that would be great.

MinML-RPC (from http://www.wilson.co.uk) has a Base64 module which performs
pretty much as well as the old one in the Helma implementation (I have used
Hannes' benchmarks on both implementations - sometime I win sometimes,
Hannes wins!). MinML-RPC is released under a BSD licence and you are most
welcome to take what you would like from the code base.


> At CollabNet, we aren't passing binary data around over XML-RPC, so we
won't
> be hitting that code.

Yes, but surely Apache XML-RPC is being developed and supported for a wider
audience than CollabNet. Or have I misunderstood something?

John Wilson
The Wilson Partnership
http://www.wilson.co.uk




Re: [patch] catalina base64, optimizations and code cleanup

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 2/19/02 11:47 AM, "John Wilson" <tu...@wilson.co.uk> wrote:

> Have you done any performance testing on this new code? Historically we had
> quite a bit of problems with people reporting very poor performance with
> large (multi megabyte) Base64 values (Yes, people do do this sort of thing
> with XML-RPC!). I think Hannes did some tuning work on the old code.
> 
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk

My decision to use Catalina' code is based entirely on the fact that
Catalina is *by far* the most used piece of software on Jakarta. Something
like 100-200,000 downloads/week. If the Base64 implementation sucked, it
would have been discovered a long time ago.

That said, we *have* to get rid of the LGPL one. We just can't have that in
CVS. It was a terrible idea to spend time tuning it. It should have been
swapped out a long time ago.

Note, I did introduce a potential bottle neck in the xmlrpc code in that in
one case, I had to allocate a String in order to convert from byte[] to
char[]. If you are willing to write an implementation of Base64 that outputs
a char[] directly (like the GPL one did), that would be great.

At CollabNet, we aren't passing binary data around over XML-RPC, so we won't
be hitting that code.

-jon


Re: [patch] catalina base64, optimizations and code cleanup

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 2/19/02 11:47 AM, "John Wilson" <tu...@wilson.co.uk> wrote:

> Have you done any performance testing on this new code? Historically we had
> quite a bit of problems with people reporting very poor performance with
> large (multi megabyte) Base64 values (Yes, people do do this sort of thing
> with XML-RPC!). I think Hannes did some tuning work on the old code.
> 
> John Wilson
> The Wilson Partnership
> http://www.wilson.co.uk

My decision to use Catalina' code is based entirely on the fact that
Catalina is *by far* the most used piece of software on Jakarta. Something
like 100-200,000 downloads/week. If the Base64 implementation sucked, it
would have been discovered a long time ago.

That said, we *have* to get rid of the LGPL one. We just can't have that in
CVS. It was a terrible idea to spend time tuning it. It should have been
swapped out a long time ago.

Note, I did introduce a potential bottle neck in the xmlrpc code in that in
one case, I had to allocate a String in order to convert from byte[] to
char[]. If you are willing to write an implementation of Base64 that outputs
a char[] directly (like the GPL one did), that would be great.

At CollabNet, we aren't passing binary data around over XML-RPC, so we won't
be hitting that code.

-jon


Re: [patch] catalina base64, optimizations and code cleanup

Posted by John Wilson <tu...@wilson.co.uk>.
Have you done any performance testing on this new code? Historically we had
quite a bit of problems with people reporting very poor performance with
large (multi megabyte) Base64 values (Yes, people do do this sort of thing
with XML-RPC!). I think Hannes did some tuning work on the old code.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Jon Scott Stevens" <jo...@latchkey.com>
To: <rp...@xml.apache.org>
Sent: Tuesday, February 19, 2002 1:22 AM
Subject: [patch] catalina base64, optimizations and code cleanup


> Enclosed is a patch where I did a bunch of code cleanup and minor
> optimizations, switched to the catalina Base64 (note the one FIXME, if
> someone has a suggestion for a better way, let me know).
>
> There is more to come, but this is a good start...
>
> -jon
>
>


Re: [patch] catalina base64, optimizations and code cleanup

Posted by John Wilson <tu...@wilson.co.uk>.
Have you done any performance testing on this new code? Historically we had
quite a bit of problems with people reporting very poor performance with
large (multi megabyte) Base64 values (Yes, people do do this sort of thing
with XML-RPC!). I think Hannes did some tuning work on the old code.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Jon Scott Stevens" <jo...@latchkey.com>
To: <rp...@xml.apache.org>
Sent: Tuesday, February 19, 2002 1:22 AM
Subject: [patch] catalina base64, optimizations and code cleanup


> Enclosed is a patch where I did a bunch of code cleanup and minor
> optimizations, switched to the catalina Base64 (note the one FIXME, if
> someone has a suggestion for a better way, let me know).
>
> There is more to come, but this is a good start...
>
> -jon
>
>