Optimize default isolation/readonly serialization
https://github.com/geldata/gel-js/blob/master/packages/gel/src/baseConn.ts#L597-L617
Cause the "Session/Options/State" identity to change with every query, causing it to be re-serialized & re-encoded with every query (misses on stateCache: WeakMap).
Maybe another cache layer could be introduced for one or both of these options, so that a consistent Options/State input produces the same identities (for the calc-ed defaults).
Yeah, thanks for identifying this! We kinda knew we were accidentally breaking query caching here, but we haven't circled back to clean this up.
I figured you knew. Just didn't want to lose it. I know you are wearing 10 hats 🙂
Another wrench: annotations.
They contribute to the options identity but are serialized/encoded/sent separate from the class. https://github.com/geldata/gel-js/blob/master/packages/gel/src/baseConn.ts#L496-L503