Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvement for "simple" json path #922

Open
yairlenga opened this issue May 13, 2023 · 0 comments
Open

Performance improvement for "simple" json path #922

yairlenga opened this issue May 13, 2023 · 0 comments

Comments

@yairlenga
Copy link

Working on application that allow the user to extract selective data from the result objects from JSON document using (list of) json path. We are using Jackson Tree model (JSonNode) to represent the data.

I've compared performance of json path on simple expression (e.g., a.b.c, or a[2].c, - no expressions, no filtering) vs Jackson jsonNode.at(...) - using JsonPointer. Notice JsonPointer to ourperform jsonpath for those cases by a ratio of 4X. To address the problem, we added conditional logic that check if the jsonpath is "simple", and convert it to jsonpointer lookup.

I suspect jsonPath engine does not have "fast" path to evaluate those queries. I wonder if will be possible to check if a given jsonPath is "simple", and in this case, use a faster implementation that will provide faster response time for those queries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant