Subject: | Extremely slow on decoded strings under DEBUGGING perl builds |
When parsing strings that have already been decoded, using JSON::PP->new->decode (not enabling the utf8 flag) is extremely slow under perls built with the -DDEBUGGING flag. The problem appears to be the speed of the substr calls. substr is very slow in debug builds on decoded strings.
It's much faster to encode the string as UTF-8, then enable the ->utf8 flag on the JSON::PP object. Maybe it makes sense to handle decoded strings that way?
This makes many toolchain operations take significantly longer. The toolchain code can be adjusted to avoid this issue, but it seems like it would be preferable if JSON::PP could handle this case better.