Skip to content

Conversation

@nibbleshift
Copy link
Contributor

This caches DotPathToSlice and JSONPointerToSlice to prevent unnecessary allocations and string replacements on paths/pointers that are frequently looked up.

@nibbleshift
Copy link
Contributor Author

Closing this out and submitting a PR to benthos.

@nibbleshift nibbleshift closed this May 8, 2023
@nibbleshift nibbleshift reopened this Aug 24, 2023
@nibbleshift
Copy link
Contributor Author

@Jeffail Can we revisit this PR and discuss a bit more? I submitted a PR in benthos here redpanda-data/connect#1890, but I really don't like my PR for benthos. It results in some sprawling code changes that are just ugly.

If you're open to it, I'd like to re-review this PR and possibly make some updates. Making the change in gabs is much more straight-forward and cleaner.

@nibbleshift
Copy link
Contributor Author

Benchmarks

main:
image

With cache:
image

@nibbleshift
Copy link
Contributor Author

Benchmarks:

main
image

cache:
image

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

Successfully merging this pull request may close these issues.

1 participant