-
Notifications
You must be signed in to change notification settings - Fork 14
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
Implementation of radix trie #153
Conversation
Note These results are affected by shared workloads on GitHub runners. Use the results only to detect possible regressions, but always rerun on more stable machine before making any conclusions! Benchmark results (pull-request, a22beae)
Benchmark results (master, 007bb6a)
|
50895c5
to
6d0b359
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
b4cce84
to
0702a2d
Compare
Was testing on of the benchmarks locally, the key matching actually got faster by quite a bit: Before:
After:
so it looks like the reason we don't see much improvement on the existing benchmarks is because we have |
5f4bc37
to
ff235e4
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there is a room to optimize JsonMakser instance creation time if we set out minds to do so, but otherwise the implementation seems pretty nice.
As discussed before, I will do something about the JSONPath stack so that we don't have to have a separate StatefulRadixTrieNode implementation
src/test/java/dev/blaauwendraad/masker/json/InstanceCreationMemoryUsageTest.java
Show resolved
Hide resolved
@gavlyukovskiy ignore the comments and last commit for now, I am applying the comments myself and want to play around with it a bit more adding lower level unit tests and some JavaDoc |
0aa5bdb
to
930468d
Compare
930468d
to
db1f605
Compare
src/main/java/dev/blaauwendraad/masker/json/config/JsonMaskingConfig.java
Outdated
Show resolved
Hide resolved
src/main/java/dev/blaauwendraad/masker/json/config/JsonMaskingConfig.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Radix tree
This PR implements radix trie that has reduced retained memory footprint. I hoped to also see some improvements in benchmarks that affect processing, but I don't see anything conclusive 🤷 Perhaps that is because of branching in the matching methods that is now a bit more complicated.