Release/1.3.4#6
Merged
Merged
Conversation
Integrate the @mcap/browser package to enhance BlobReadable functionality and streamline decompression processes. Update architecture documentation to reflect browser-safe decompression methods and remove the deprecated BlobReadable service. Adjust IterablePlayer to utilize the new BlobReadable implementation, improving performance and maintainability.
…asm-zstd Bump the package version to 1.3.4. Update the NOTICE file to reflect the new source URL for the wasm-hdf5 repository. Replace the deprecated fzstd library with @ioai/wasm-zstd for Zstandard decompression, and update relevant documentation to ensure clarity on the new library usage.
Upgrade @ioai/wasm-zstd to 1.1.1 and pass preloaded wasm bytes from the main thread into MCAP/bag inline workers, matching the HDF5 loading pattern. Add shared E2E helpers that wait on data-player-presence before asserting dockview readiness.
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.
Description
Merge
release/1.3.4intomainto address UI stuttering when playing large zstd-compressed MCAP files, and improve worker initialization and playback stability.Key changes:
fzstdwith@ioai/wasm-zstd@^1.1.0(Vite/ESM-friendly WASM); keeplz4jsfor LZ4IterablePlayer: Make stale topic refresh asynchronous and non-blocking; adapt stale thresholds by topic frequencyMessageCursor: Add buffer duration limits, slice pump + yield to avoid long worker blockingmcap.worker: Limit playback cursor buffer ahead (1.5s) to reduce memory and decode backlogBlobReadable; use@mcap/browserLoadingOverlay; support cancellable worker initialization (WorkerSourceCancelledError)@ioai/hdf5to^1.0.0; addhdf5RuntimeLoadernpm run gen:e2e:fixtures1.3.3→1.3.4Motivation / related issue
When playing large zstd-compressed MCAP files (e.g.
20241224_demo_gripper_PickAndPlace_ljw.mcap), the progress bar and UI stutter noticeably, with layouts/sec fluctuating between 5–20, while CPU usage stays below 10%.Root causes include:
fzstddecompression is too slow; zstd chunk decoding becomes a worker bottleneckawaited in the playback tick loop, blocking the main loopMessageCursorhad no duration-based buffer limit, causing queue buildup and latency spikes on high-throughput topicsCloses #
Type of change
Checklist
npm run lintpasses with no errorsnpm testpasses (unit tests) — 351 tests passednpm run buildandnpm run build:libsucceedWorkerSerializedSource.test.ts(cancel initialization)MessageCursor/ playback-related tests passdocs/ARCHITECTURE.md/docs/ARCHITECTURE.zh.mdAPI compatibility
N/A — no changes to exports in
src/entrypoints/index.ts. Internal worker decompression switched fromfzstdto@ioai/wasm-zstd; public API is unchanged.New runtime dependencies:
@ioai/wasm-zstd@^1.1.0(published to npm)@mcap/browser@^1.1.0Removed dependencies:
fzstdMerge notes
mainhas 4 panel directory rename/refactor commits (Component.tsx→*Panel.tsx,foxglove-core→core, etc.) that do not conflict with this worker/playback work. The only merge attention needed isdocs/ARCHITECTURE.zh.md(changed in both branches).Do not commit the untracked
wasm-zstd/subdirectory —rosviewconsumes@ioai/wasm-zstdvia npm.Test plan
20241224_demo_gripper_PickAndPlace_ljw.mcap— progress bar should be smooth, layouts/sec stablebanana_*.mcap, ~4 GB) — no regressionnpm run test:e2epassesScreenshots / recordings