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

Enhancement: JsonPointer performance improvements #116

Closed
1 task done
OptimumCode opened this issue May 13, 2024 · 0 comments · Fixed by #117
Closed
1 task done

Enhancement: JsonPointer performance improvements #116

OptimumCode opened this issue May 13, 2024 · 0 comments · Fixed by #117
Assignees
Labels
enhancement New feature or request

Comments

@OptimumCode
Copy link
Owner

Is there an existing issue for this?

  • I have searched the existing issues

Enhancement description

In the current version, JsonPointer uses a lot of string concatenations (with StringBuilder) and parsing following those concatenations. As a result significant amount of time spent on those operations.

This can be changed if the way JsonPointer stores the path is updated. Right now it holds the whole path string and different segments use their offset in that path. It helps to improve toString and hashCode operations, however, it negatively impacts other operations. To reduce this impact JsonPointer should not store the path string and should compute it based on the segments it has. To keep performance for toString and hashCode methods on a normal level those values should be cached

@OptimumCode OptimumCode added the enhancement New feature or request label May 13, 2024
@OptimumCode OptimumCode self-assigned this May 13, 2024
@OptimumCode OptimumCode moved this from 📋 Backlog to 🏗 In progress in Multi-platform JSON schema validator May 13, 2024
OptimumCode added a commit that referenced this issue May 13, 2024
Rework JsonPointer to reduce time spent on creating a new one from the
existing one.

Resolves #116
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Multi-platform JSON schema validator May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

1 participant