[Petal] [PATCH] Change to XML encode and decode

Jean-Michel Hiver jhiver at mkdoc.com
Mon Apr 7 11:18:35 BST 2003


On Fri 04-Apr-2003 at 06:22:34PM +0100, Fergal Daly wrote:
> The XML encode and decode routines do 4 regex substitiutions each, one for 
> each thing that need to be (un)escaped. This patch turns it into a single 
> regex, using a hash lookup on the right hand side.
> 
> The hash lookup is going to slow things down slightly whenever something is 
> substituted but the fact that there's only 1 regex instead of 4 should give a 
> good speed boost, especially if the string is long.

Hi,

Thanks for your interest in Petal, and thanks for this patch! I'll apply
it to Petal 0.91, which I'll release probably today.

Best Regards,
-- 
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/


More information about the Petal mailing list