cfengine / design-center

CFEngine community-contributed content
http://cfengine.com/
Other
80 stars 68 forks source link

Change JSON library from JSON:PP to JSON::XS #419

Closed nishesj closed 3 years ago

nishesj commented 10 years ago

Change the json parser from PP to XS

zzamboni commented 10 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 --

nishesj commented 10 years ago

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..

zzamboni commented 10 years ago

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.

tzz commented 10 years ago

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.