Repository navigation
Vector tiles read by one MVT reader in Rust, the TypeScript and former Rust readers gone - #629
Merged
Merged
Conversation
…ad total per frame, and the vector tiles slice's open points settled
…TypeScript and Rust readers
…cript and former Rust readers gone
…formed tiles reported once, the contract test on the recorded tiles in place The tessellation module becomes the vector tiles module (isard_vector_tiles_bg.wasm, vectorTilesWasmUrl, the vectorTilesModule message). A trap of the module makes its instance again with a fresh memory instead of stopping the worker; a malformed tile is an error marked as such, the first one reported by the pool. The MVT reader's names are the same in Rust and TypeScript (TileLayer, TileFeature, GeometryType, ValueType), its errors split. The contract test reads the tiles where the visual tests recorded them, its tolerance in the fixture. The budgets are the measured sizes plus five per cent, and the temporary export from the former base is written in target.md and bindings/README.md.
…e, not thirteen a layer The vector tiles module gives where each layer's columns are in its memory in one header (VectorTile::columns), and data/mvt.ts copies them out from there: a small tile is no longer slower to read than with the former TypeScript reader in JavaScriptCore. The budgets follow the sizes measured.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First slice of the vector tiles port to the target (#536): one MVT reader, in Rust.
crates/technique/graphic-engine(isard-graphic-engine):formats::protobuf, the generic protobuf reader (named errors, varints without allocation).crates/domain/layers(isard-layers):vector_tiles::mvt, the MVT reader into columns (TileLayer,TileFeature,GeometryType).Pbfincluded) and the former Rustdata/mvt.rsanddata/pbf.rsare deleted. The workers, the glyphs, LiDAR HD, the native app and the fuzz target read through the new reader;data/mvt.tsonly presents the Rust columns asTileFeatures.isard_vector_tiles, optionvectorTilesWasmUrl, no shim). Its JS boundary stays inlegacy/crates/core/src/module.rsfor now (one wasm download in the worker), written as a temporary exception indocs/contribute/target.md: the whole read and tessellate task moves tobindings/with slice 3.--experimental-reset-state-function, this module only), reported once; a malformed tile is an error, reported once by the worker pool.docs/contribute/target.md: the decisions of 29 November (crate names kept, one upload total per frame, the slice's open points).Contract test
tests/fixtures/mvt.json, generated byscripts/test/mvt-fixture.tsfrom@mapbox/vector-tile3.0.0 onpbf5.2.1 over recorded tiles already in the repo (Paris z14 OpenFreeMap and PLAN IGN, Alps z12, world z1, a small z14, OGC API NRW, the LiDAR HD index), edge cases and malformed tiles. It passed on the former TypeScript and Rust readers first (second commit), then on the new one, read by a TypeScript test and a Rust test.Performance against main
Frames, 3 runs a side, alternated, Apple M5, quiet machine: no path slower.
Decoding a tile and reading every feature, median ms, alternated runs, quiet machine (bun = JavaScriptCore, node 22 = V8):
Size:
isard_vector_tiles_bg.wasm+5.4 KB gzip (56.3 KB), accepted; budgets at the measured size + 5 %.Part of #536.