in reply to JSON::XS Bool issue in mod_perl
XS code is almost always buggy (and the bugs are a huge pain in being very "weird" and tending to be huge consumers of a developer's time). JSON::PP uses an algorithm that is efficient in C but is especially slow in Perl. You might have the best luck with some other non-XS implementation. Try JSON::Tiny or some other JSON module.
It should be fairly easy to efficiently parse JSON in Perl, but there are also some typical traps to avoid so many JSON parsing approaches in Perl will be less efficient, so let us know how efficient are the modules that you try.
It is too bad that the author of JSON::XS didn't know that one should thoroughly avoid manipulating Perl data structures from XS code. Creating Perl data structures in XS code is an even worse idea. But this is a case where it actually would be quite hard to do the parsing in XS while creating the Perl data structures in Perl.
But I (wrongly) recall looking at the code and thinking that the creation of the 'true' and 'false' values should've been done in Perl. I guess my instincts were right about that, even though we haven't noticed this problem (also common for XS bugs).
- tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: JSON::XS Bool issue in mod_perl (XS--)
by ikegami (Patriarch) on Mar 02, 2013 at 15:52 UTC | |
Re^2: JSON::XS Bool issue in mod_perl (XS--)
by allyc (Scribe) on Mar 01, 2013 at 20:51 UTC | |
by tye (Sage) on Mar 01, 2013 at 22:12 UTC |