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

Fergal Daly fergal at esatclear.ie
Fri Apr 4 19:22:34 BST 2003


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.

No tests fail,

Fergal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: en_de.diff
Type: text/x-diff
Size: 1509 bytes
Desc: not available
Url : http://www.email-lists.org/pipermail/petal/attachments/20030404/c7de4ff4/en_de.bin


More information about the Petal mailing list