Expand description
Parquet serialization for efficient mesh data transfer.
Uses columnar format (ara3d BOS-compatible) for dramatically better compression compared to JSON serialization. Typical compression ratios:
- JSON: ~30KB per mesh with ~500 vertices
- Parquet: ~2KB per mesh (15x smaller)
Structs§
- Streaming
Parquet Cache Writer - Incremental whole-model cache writer for the streaming endpoint: each
batch’s columns are appended as one Parquet row group per table, so no
MeshDatahas to be retained past the batch that produced it (previously the endpoint kept a FULL second copy of the model’s meshes just to re-serialize them at Complete). The mesh-tablevertex_start/index_startcolumns carry GLOBAL offsets (whole-model), matching what the one-shotserialize_to_parquetemits for the cached fast-path replay.
Enums§
- Parquet
Error - Errors during Parquet serialization.
Functions§
- check_
u32_ 🔒len - Fail loud instead of silently truncating a wire-format
u32length prefix when a section exceeds 4 GiB. - frame_
combined_ 🔒sections - Assemble the three Parquet buffers directly into the OUTER combined
framing the parse endpoints wrap the geometry blob in:
[geo_len:u32][geo_bytes][data_model_len=0:u32], wheregeo_bytesis exactlyframe_sections’s[mesh_len][mesh][vertex_len][vertex][index_len][index]layout. Endpoints that don’t attach a data model inline (the streamed cache fill) previously calledframe_sectionsfor the inner blob and then copied that whole blob a second time into an outerVecto add the[geo_len]...[dm_len=0]wrapper. Writing both frames into one pre-sized allocation skips that second copy; the resulting bytes are identical to the old two-copy path. - frame_
sections 🔒 - Assemble the three Parquet buffers into the length-prefixed section layout shared by the whole-model serializer and the incremental cache writer. Section lengths are u32 on the wire; fail loud instead of truncating a section over 4 GiB into a silently corrupt blob.
- serialize_
batch_ with_ layout - Serialize one batch under the layout the client asked for, sharing nothing.
- serialize_
combined_ 🔒for_ layout - The whole-model body of
POST /api/v1/parse/parquetunder the layout the client asked for, already in the outer[geo_len][geo_bytes][data_model_len=0]framing. OnlySharedShapesruns the shape-sharing planner; a default request gets the pre-#3888 bytes (#3888). Framed byframe_combined_sections, which guards the outer length (it can passu32::MAXwhile every section passes) and writes both frames in one allocation. - serialize_
with_ 🔒plan - write_
parquet_ 🔒buffer - Write a RecordBatch to a Parquet buffer with LZ4 compression. Dictionary encoding is disabled for numeric columns (floats, integers) as they have high entropy and dictionary encoding provides no benefit while adding significant overhead.
- write_
sections 🔒 - The mesh, vertex and index tables, each written as its own Parquet buffer.
- writer_
props 🔒 - Writer properties shared by the one-shot and incremental writers: LZ4, and dictionary encoding disabled for numeric columns (high-entropy vertex data gains nothing from a dictionary while paying significant overhead).
Type Aliases§
- Sections 🔒
- The mesh, vertex and index Parquet buffers, in wire order.