Skip to content

Add the IOExtend browser tools site source - #13

Draft
mahach666 wants to merge 19 commits into
mainfrom
codex/ioextend-web-browser-tools
Draft

mahach666 wants to merge 19 commits into
mainfrom
codex/ioextend-web-browser-tools

Conversation

@mahach666

@mahach666 mahach666 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Parallel browser reader checkpoint

The small-RVT profile can now be rebuilt from this PR, public RvtIO main plus #310, and the pinned IOViewer revision. Instructions are in site/README.md. The source patch applies to a separate browser build of RvtIO. The coordinator streams the native runtime through the .NET SDK loader and shares its bytes with the decoder workers.

Three Chromium runs on the original Revit 2027 architectural sample showed the first visible frame in 10.890, 10.428 and 10.331 seconds (median 10.428 seconds). The previous reproducible single-worker median was 24.073 seconds. Each run checked the complete scene, native metadata and properties, the known browser geometry digest, and one native WASM fetch. Files larger than 50 MiB use the paged reader.

Changes

  • Add the IOExtend browser tools under site/, including the branded UI and versioned static assets.
  • Open RVT and NWC locally in the browser. Use the browser's private file storage for paged RVT previews.
  • Export models and create Revit copies for earlier versions. Detect the source release from metadata and include reduced year profiles, their generator, and conversion reports.
  • Show progress by stage, measured counts, elapsed time, and batch progress. Report WebAssembly memory errors and document the larger export heap build.
  • Add eleven locales with a browser-driven Auto mode and manual selection. Use the localized IOViewer for standalone RVT and NWC HTML downloads.
  • Include source build instructions, design notes, and browser smoke tests.

The tested local-page build uses IOViewer #81, IOViewer #82, and RvtIO #308. The Revit downgrade and NwcIO source revisions are recorded in the site README. This draft preserves the source for review before a Pages setup.

Validation

  • Built the site from this checkout with dotnet publish, using the IOViewer and RvtIO source references.
  • Ran the warm-cache and localization smoke tests from this checkout against the tested local site.
  • The local browser build passed RVT and NWC opening, extraction and cancellation checks, export downloads, and Revit downgrade with reports.
  • Verified the language selection on embedded RVT and NWC viewers and in offline HTML exports.
  • Inspected the reduced Revit profiles. Their compound files contain the release and build metadata, archive header, and class table.

RvtIO main comparison

The comparative build profile can compile against RvtIO without the scratch API from #308. It uses the guarded browser post-processing from RvtIO #310.

On the public structural Revit sample, Compact JSON dropped from 88.6 s to 47.5 s and matched byte for byte. The first browser frame took 33.4 s on the scratch build and 45.9 s on the new candidate. Both rendered a scene with 484 instances and 84,494 triangles. The default build retains the scratch API from #308 for large files.

Threaded viewer experiment

Adds an opt-in .NET 10 AOT viewer profile using shared WebAssembly memory and the bounded decode batches in IOExtend/RvtIO#311. It preserves the single-threaded build as the default.

The threaded build uses either COOP/COEP from the static host or a scoped Service Worker. Chromium rendered the public structural sample using both configurations. The sandboxed render frame receives the self-contained viewer locally when Service Worker isolation is active. The scene packages compare byte for byte. The existing single-threaded browser suite passed with the updated web assets.

A repeat run exposed a WebAssembly bounds trap in the initial threaded AOT candidate. Treat the threaded profile as experimental while browser stability and throughput are validated.

Browser viewer checkpoint

  • Use one selected RVT across View, Export, and Revit Version. Start 3D rendering when View opens and preserve the camera when switching tabs.
  • Restyle the language selector and record ioextend:first-frame after rendering.
  • Allow a versioned fast reader bundle for supported RVTs up to 50 MiB. Preserve the paged fallback when the reader or renderer fails, and support static hosts through a scoped Service Worker.

Chromium passed 13 fast-reader scenarios and the static release smoke test. Node passed four scratch-storage tests. On the Revit 2027 racbasicsampleproject.rvt fixture, the control browser reader rendered the full scene in 13.825 s. Clean RvtIO main wrote HTML in 9.438–9.466 s in the same series. The 8 s first-frame target remains open. This checkpoint contains site source.

Visible first frame on the Revit 2027 sample

On the original racbasicsampleproject.rvt, the local experimental reader incorporating RvtIO #329 displayed the complete scene in 9.737, 9.677 and 9.691 seconds. The browser check starts at file selection and samples the parent page after the ready iframe has been revealed and had a paint opportunity. Each run verified 466 elements, 730 instances, 403 packaged geometries, property data and a single WASM request. Clean RvtIO d6e7d8b exported standalone HTML in 7.101 seconds immediately after these runs. The gap to the median browser result is 2.590 seconds.

This PR includes the site timing change, the real-model regression check and the measurements in site/AUDIT.md. The experimental WASM bundle was built locally. All 13 fast-reader browser scenarios and the static-release smoke test passed.

RVT-only AOT build checkpoint

The optional IOExtendFastReader build uses full trimming and exports standalone HTML with the specified IOViewer source revision. NWC and paged viewing use the main reader. The default build and the AOT publish passed. Chromium passed all 14 fast-reader scenarios and the static release check. A real NWC opened with 4,035 instances through the main reader.

On the original Revit 2027 sample, clean RvtIO d6e7d8b raised Arg_PlatformNotSupported inside the fast reader. The site recovered through the paged reader and displayed the model in 60.448 s in a diagnostic run. The regression check now reports which WASM runtimes were loaded before examining the standalone canvas.

With the local parallel decoders and placement changes, the RVT-only profile displayed the complete scene in 8.870, 8.924, 8.912 and 8.864 s (median 8.891 s). Native HTML export took 6.952–7.059 s in the trim comparison. The experimental core and worker binaries are outside this PR. Source and measurements are in site/README.md and site/AUDIT.md.

Reproducible fast path using public sources

The browser stack identified a blocking task wait in ElementBuilder.PostProcess. The build instructions now combine RvtIO d6e7d8b with the published browser fix from RvtIO #310 in an isolated source directory. The fast reader uses a larger nursery on the pooled, small-RVT profile. Four Revit 2027 models retained identical scene sections across the two GC settings.

The published source revisions produced a visible frame in 24.212, 23.935 and 24.073 s on the original architectural sample. Each run loaded one WASM module and verified the full scene. The new native reference tool wrote the matching standalone HTML from clean main in 6.999 s immediately before this series. The reproducible gap is 17.074 s. The earlier 8.891 s median still describes the local experimental parallel decoder.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant