Skip to content

Conversation

@joshua-spacetime
Copy link
Collaborator

Description of Changes

Takes compression off the hot path of subscription evaluation while we are holding the tx lock. This means the server may be doing extra work if many clients are subscribed to the same queries, but it also means that extra work will be happening on a separate thread and not blocking transactions. It also means that clients will only have to decompress messages once before deserializing them.

API and ABI breaking changes

None

Expected complexity level and risk

1

Testing

  • Bot test

@joshua-spacetime joshua-spacetime linked an issue Apr 24, 2025 that may be closed by this pull request
@jsdt
Copy link
Contributor

jsdt commented Apr 24, 2025

If you want a hack that will also stop double-compressing subscriptions: https://github.com/clockworklabs/SpacetimeDB/compare/master...jsdt/skip-qu-compression-hack?expand=1

@Centril
Copy link
Contributor

Centril commented Apr 25, 2025

If you want a hack that will also stop double-compressing subscriptions: https://github.com/clockworklabs/SpacetimeDB/compare/master...jsdt/skip-qu-compression-hack?expand=1

(Before merging, we should remove the compression parameter altogether..)

@joshua-spacetime joshua-spacetime force-pushed the joshua/perf/no-double-compress-tx-updates branch 2 times, most recently from 4d1b0fd to 90ca090 Compare April 29, 2025 17:16
@joshua-spacetime joshua-spacetime marked this pull request as ready for review April 29, 2025 17:17
Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@joshua-spacetime joshua-spacetime force-pushed the joshua/perf/no-double-compress-tx-updates branch from edd0b35 to 2a553a2 Compare April 30, 2025 15:57
@joshua-spacetime joshua-spacetime added this pull request to the merge queue Apr 30, 2025
Merged via the queue into master with commit dc3dd68 Apr 30, 2025
19 checks passed
@Centril Centril deleted the joshua/perf/no-double-compress-tx-updates branch April 30, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not double compress transaction updates

4 participants