Replies: 1 comment
-
Context: During this PR I found our that not using More specifically on:
Here is the benchmark that compares using
Investigation: It was really interesting that not using this methods and the two options I presented gave interesting performance improvements, and we thought maybe we can leverage this knowledge and using it in the whole flattener. I conducted some benchmarks, which essentially scans a json byte array ( The reason that The interesting stuff I found is:
I checked other json parsers on how they managing their state, and found that it splits:
I can do POC of the second option to see how much it improves the performance, but it will be have worse DX and be more error prone. so I am not sure if the cost (performance vs complexity) will be worth it. Before going to POC, I would to hear an opinion about this investigation results & does the complexity is something we want to consider or it doesn't worth it. Some note: Regarding this issue: #113, the next thing I am planning to work is doing a PR with my "Paths Index" idea that would allow us:
|
Beta Was this translation helpful? Give feedback.
-
@yosiat has been working on flatten_json.go and has lots of interesting findings. He requested that I enable discussions… I was able to launch one, so maybe that auto-enables them?
Since the cost of flattening is typically ~50% of the
matchesForJSONEvent
, it's a good place to invest in improving Quamina's performance!Beta Was this translation helpful? Give feedback.
All reactions