pablrod / p5-Chart-Plotly

Generate html/javascript charts with perl data using javascript library Plotly.js
MIT License
9 stars 4 forks source link

Switch from JSON to JSON::MaybeXS? #20

Closed iynehz closed 5 years ago

iynehz commented 5 years ago

@pablrod, do you think it fine to switch to JSON::MaybeXS? For one of my Chart::GGPlot example that has 50K data points this could save about 1sec. If you think it fine I will create a PR.

pablrod commented 5 years ago

It's fine for me!

I've read the differences between JSON and JSON::MaybeXS and I see no problem! Also I like the speed improvement!! :wink:

iynehz commented 5 years ago

I just realized why JSON was slow on my host was because that I did not have JSON::XS and JSON would fallback to JSON::PP in this case. Now with JSON::XS installed there is no performance difference compared to JSON::MaybeXS which uses Cpanel::JSON::XS. So I think for now there is not the need to switch to JSON::MaybeXS. We might revisit this if in future we find limitations in JSON/JSON::XS.

pablrod commented 5 years ago

Ok! Then It's better not to switch to JSON::MaybeXS.