Skip to content

Viewer: show real decode progress, and say clearly when a model is too large for the browser #1195

Open

Description

@DrunkOnJava

Summary

Two improvements to how the browser viewer opens models: showing real progress, and handling models too large for the browser.

Checklist

  • Real progress. While a model decodes, the progress bar stays indeterminate and the loading card shows an "about N s" estimate from the file size, because the viewer cannot get progress from the decoder (viewer/src/main.ts, near DECODE_BYTES_PER_SECOND). Since feat(cli): rvt-gltf --progress, with saved-graphics stages in WalkerControl #1072 the decoder's WalkerControl reports progress stages for rvt-gltf --progress. Done when the wasm binding passes those stages through viewer/src/worker.ts to the page and the bar shows them, with the estimate kept as a fallback and the Playwright suite covering it.
  • Models too large for the browser. WebAssembly can address at most 4 GiB, and a model's decode needs about ten times its file size (Core Interior's 32 MiB file peaks at 324 MiB, feat(viewer): draw doors and windows from their saved meshes, with a toggle #1150). A model like the one behind Bug: models with a partition stream over 256 MiB open empty, with no error #1075 (a 1,057 MiB partition) can fail even after "Retry with large-model limits", and the browser reports only RuntimeError: unreachable. Done when the viewer tells the user plainly that the model is too large for the browser and points them to the CLI. The options for opening larger models (wasm64/memory64, streaming partitions, reading fewer streams) are measured and the choice documented.

Where to start

viewer/src/worker.ts, viewer/src/main.ts, rvt-wasm/src/lib.rs, docs/viewer-api.md, and viewer/tests/saved-meshes-measure.spec.ts, which measures wasm memory per model.

Activity

  1. added
    area:viewer
    priority:P2
    type:feature
    on Oct 30, 2026
  2. 19 remaining items

  3. DrunkOnJava commented on Nov 15, 2026

    @DrunkOnJava
    OwnerAuthor

    Checked against main (e594a2b) on 2026-11-15, what is left here:

    • Item 1 (real progress): done. The binding passes the decoder's stages through (rvt-wasm/src/lib.rs forward_progress), the loading card shows them with the size estimate as the fallback, and viewer/tests/load-progress.spec.ts covers it (feat(viewer): the loading card shows the decoder's own progress, and a model too large for the tab says so (#1195) #1297).
    • Item 2, the message: done. An open that runs out of wasm memory says the file is too large for a browser tab and points to rvt-ifc and rvt-gltf with --large-model and to the Python package (viewer/src/main.ts, feat(viewer): the loading card shows the decoder's own progress, and a model too large for the tab says so (#1195) #1297).
    • Item 2, the options: measured for three of six. docs/viewer-api.md lists the options for opening a larger model; its own words are that only the first three rows are measured and none is built. The choice it documents is the shipped one, say so and point to the CLI.
    • Still open, from the same page: on Core Interior the bar is determinate for about a tenth of an open, because the decoder reports nothing for the partition-schema recovery passes and the export's own passes (26.4 s of a 31.6 s open in load-progress.spec.ts). Reporting progress through those passes is the remaining part of "real progress", and a library change, not a viewer one.

    Left open for those two: stage reports from the recovery and export passes, and measuring the three options the page only reads.

  4. DrunkOnJava commented on Nov 19, 2026

    @DrunkOnJava
    OwnerAuthor

    #2095 (merged) reports progress through the recovery over the element records, the remaining part of "real progress" from the note above. A new stage, partition-recovery (rvt::control::Stage::PartitionRecovery, printed by rvt-gltf --progress and passed to the viewer's progress function), counts the recovery's 86 steps once every partition stream is inflated, and the viewer's card shows it as "Reading element records" with its count, where it swept with "Building the model". On Core Interior the stretch after it no longer grows the wasm memory (308.1 MiB at the recovery's end and at the saved graphics' start, Deploy viewer 44488437867). No export changes: 65 of 65 exports and diagnostics identical (Measure 44493295189).

    Left open here: measuring the three options for larger models that docs/viewer-api.md only reads (one copy of the file, streaming partitions, wasm64).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:viewerpriority:P2type:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions