Perf: remove reliance on in-box JSON marshaller #19356
Labels
auto-close-exempt
Prevents the auto-close from closing based on max lifetime
CodeGen
Issues that relate to code generation
pillar-performance
The issue is related to performance, one of our core engineering pillars.
Milestone
Our reliance on the standard library's JSON marshaller/unmarshaller is unnecessary (and expensive) as we have all the type information available during code generation. Consider the below benchmarks.
The second benchmark (
BenchmarkPrototypeMarshaller
) uses a custom JSON marshaller that builds the JSON string with astrings.Builder
. It starts with a 512-byte buffer (more didn't improve things). However, this value might need to be tuned for optimal performance.The win is very clear and is worth investigating further.
The text was updated successfully, but these errors were encountered: