Conversation
|
commit: |
JulienLavocat
left a comment
There was a problem hiding this comment.
What is the reason to add base64-js? Because we need to support both browsers and non-browser platforms like Node.Js ?
Yes, that is why I added it. |
|
LGTM |
* Get it working with base64 encoded row ids, and start adding the better way for indexing. * Use concat to avoid creating too many arguments for big updates. * Use primitives as rowIds * Remove OperationsMap * Add some table cache tests and regen stuff. * Cleanup * revert accidental cargo change. * Add semver parsing. * Add a minimum version check. * Use qmark syntax. * Regen quickstart-chat bindings with 1.2.0 cli * Bump minimum codegen version. * Regen test app with 1.2
Description of Changes
This makes a few performance improvements. It is pretty similar to #179. The key changes are:
This also has the fix of push each new operation instead of using the spread syntax (similar to the fix of using
concatthat was in #179).Since I was already making some changes in the TableCache, I added some more context to log messages, so hopefully any future bug reports will be easier to look into.
These changes also give us a way to make
findefficient, but I didn't put it in this PR.Requires SpacetimeDB PRs
Requires this codegen change clockworklabs/SpacetimeDB#2671, so we need to wait for the next release.
I'm going to leave this as a draft until we release a version with the required codegen changes.
Once we get this codegen change released, which adds the CLI version to the generated typescript code. I can add an assertion in the client that the generated code came from a compatible version.
Testing
There are some existing tests in
db_connection.test.tsthat cover parsing update messages, and this PR addstable_cache.test.ts, which has testing for applying row operations to the table cache (and the resulting callbacks).