jsonpath-object-transform icon indicating copy to clipboard operation
jsonpath-object-transform copied to clipboard

Slow processing?

Open jamesladd opened this issue 6 years ago • 2 comments

Hi dvdLn,

I think this is a really useful package. Thanks for taking the time to write it.

When using jsonpath-object-transform V1.0.4 I have noticed that the time taken to perform a transform is quite long. Of course this is dependent on how long my JSON is and the number of rules to apply to it.

However, is there anything you can do to improve the speed of this library?

Are there any tips about how to improve the speed of transforms on my side, ie: particular expressions to avoid ?

  • James.

jamesladd avatar Mar 20 '18 23:03 jamesladd

Bump.

It looks like jsonpath-object-transform v1.0.4 depends on JSONPath which has known performance issues (at least at this time): https://github.com/s3u/JSONPath/issues/14.

@dvdln - you may want to consider using latest jsonpath as a dependency instead: https://www.npmjs.com/package/jsonpath. Were you using any additional features that JSONPath was providing?

Trying to find the perfect blend of JSON transformation packages--thought in 2018 there would be some clear winners. This one does seem very promising though!

Cheers Damian

deekayw0n avatar Jul 31 '18 17:07 deekayw0n

FWIW, as a (relatively passive) maintainer of jsonpath-plus, it has come to our attention that reports of jsonpath-plus' supposed performance problems may have been premature (or tied to earlier Node versions) with it seeming to actually perform well compared to other jsonpath implementations. See https://github.com/s3u/JSONPath/issues/14 for a fuller background. If you find this to be inaccurate, however, it would be great to have additional tests that indicate any problems submitted to the likes of https://github.com/andykais/json-querying-performance-testing , so the libraries can improve and users may discover the best solution for their needs.

brettz9 avatar Jun 16 '19 06:06 brettz9