Open chrisdone opened 5 years ago
I just feel icky doing performance work when we don't have benchmarks. It's first of all hard to tell if the effort is worth it, and second we don't get to feel good about any big gains we've attained.
@tirumaraiselvan do you have any thoughts on benchmarking as it relates to this feature?
also relevant to https://github.com/tirumaraiselvan/graphql-engine/issues/30
I can take this one.
Yeah, these are optimizations that we better do more systematically. So let's put this on hold.
Currently we're using aeson's
decode
to parse intoValue
structures, lookup thedata
field, then union theHashMap
s, which is convenient but less efficient than if we parsed the boundaries of the object using the attoparsec combinators, located thedata
key boundaries, and then just concatenated the bytestrings together at the right point as aBuilder
(theEncJSON
uses this). Here is an example of parsing directly.