Hi,
I also want to thank you for your code, the performance is already much better than the original PL/JSON package. But I have a suggestion for further performance improvement of the to_clob() functionality. The idea is to shortcut the character by character conversion loop, when the input string of the escape function only contains valid ascii characters:
IF (theString IS NULL) THEN
RETURN '';
ElsIf Translate(theString, '\ !#$%&''()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~', '\') Is Null Then
-- theString contains only characters with ascii codes 32, 33, 35..46, 48..91, 93..126
Return theString;
END IF;
What are your thoughts on this? Am I missing something?
Thanks, Ralf
Thank you for the input, but according to my tests if would have very little (about 1%) performance impact on strings that must be converted and would slow down (about 5%) strings that must be converted.
Hi, I also want to thank you for your code, the performance is already much better than the original PL/JSON package. But I have a suggestion for further performance improvement of the to_clob() functionality. The idea is to shortcut the character by character conversion loop, when the input string of the escape function only contains valid ascii characters:
What are your thoughts on this? Am I missing something? Thanks, Ralf