Closed nishesj closed 3 years ago
What's the reason for this? We moved away from XS (which requires compilation) to be able to include the JSON modules with cf-sketch. --Diego
On Thu, Jan 9, 2014 at 12:15 PM, Nishes Joshi notifications@github.com wrote:
Change the json parser from PP to XS You can merge this Pull Request by running: git pull https://github.com/nishesj/design-center json-xs Or you can view, comment on it, or merge it online at: https://github.com/cfengine/design-center/pull/419 -- Commit Summary --
Change JSON library from JSON:PP to JSON::XS -- File Changes -- M tools/cf-sketch/cf-dc-api.pl (2) M tools/cf-sketch/constdata.conf (268) M tools/cf-sketch/perl-lib/DCAPI.pm (2) M tools/cf-sketch/perl-lib/DCAPI/Result.pm (2) -- Patch Links -- https://github.com/cfengine/design-center/pull/419.patch https://github.com/cfengine/design-center/pull/419.diff
Reply to this email directly or view it on GitHub: https://github.com/cfengine/design-center/pull/419
The dc Api is twice faster with the XS than PP. So if we can switch or better fallback to PP if XS is not found is better rather than hardcoding PP library or XS. And JSON lib that we are using i think does it by default as well..
I thought this was already the case - @tzz?
On Jan 9, 2014, at 12:26 PM, Nishes Joshi notifications@github.com wrote:
The dc Api is twice faster with the XS than PP. So if we can switch or better fallback to PP if XS is not found is better.
— Reply to this email directly or view it on GitHub.
Currently we use PP because XS can't handle bareword keys.
The speed difference is 10x so we should use XS if we can.
It may be smarter to try a XS parse, then drop to PP if the XS parse failed.
Change the json parser from PP to XS