clockworklabs / SpacetimeDB

Multiplayer at the speed of light
https://spacetimedb.com
Other
4.15k stars 100 forks source link

Swap the location of tags in the BFLATN encoding #1063

Closed kazimuth closed 1 month ago

kazimuth commented 1 month ago

Description of Changes

Partially implements #1006. I haven't ensured we're actually doing the relevant memcpy optimizations yet.

API and ABI breaking changes

Is BFLATN public ABI yet? It will be once we have snapshots I suppose. So, a breaking change on the BFLATN ABI.

Expected complexity level and risk

3

Testing

I want to run this under miri but haven't done so yet.

Centril commented 1 month ago

#

Is BFLATN public ABI yet? It will be once we have snapshots I suppose. So, a breaking change on the BFLATN ABI.

BFLATN never leaks (yet) out of the db to consumers either in modules, queries, or subscriptions, so it's not public and thus this change isn't breaking.

kazimuth commented 1 month ago

Okay, the optimization is implemented.

Is BFLATN public ABI yet? It will be once we have snapshots I suppose. So, a breaking change on the BFLATN ABI.

BFLATN never leaks (yet) out of the db to consumers either in modules, queries, or subscriptions, so it's not public and thus this change isn't breaking.

Do we not consider stuff written to the filesystem as ABI? If this was merged after snapshots it would result in a change of our on-disk format, so that should be ABI right? (Whether or not it actually gets merged after snapshots is a different question.)

gefjon commented 1 month ago

Do we not consider stuff written to the filesystem as ABI? If this was merged after snapshots it would result in a change of our on-disk format, so that should be ABI right? (Whether or not it actually gets merged after snapshots is a different question.)

Well, given that you're implementing this now, and no one has started working on snapshots yet, I think we're good.

kazimuth commented 1 month ago

Okay I think this is ready