You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: reuse the encoding the after image already built
Copying the state encodes it and parses the result, then threw the
encoded string away. complete then normalized and encoded the same hash
a second time, only to learn its size. A committed turn therefore
traversed the state three times and encoded it three times, where two of
each are necessary.
to_h_with_byte_size returns the copy beside the size of the encoding
that produced it, and the commit enforces max_state_bytes against that
size rather than by encoding again. The turn still fails with
PayloadTooLarge before it opens its transaction, which a test now covers
end to end, because nothing covered the hard limit before.
Measured on SQLite against the released 0.14.3 tree, medians of five
interleaved runs: 5.3% more committed messages per second at 13 KB of
state, 16.1% at 116 KB, and 12.0% at 1 MB.
solid-objects-js already measures the string it commits. This brings the
gem to the same shape.
0 commit comments