Repository navigation
fix(research): the saved-mesh pass reads each owner's graph with the batch it is meshed in, so the default export no longer holds every wall's graph at once (#1690) - #1691
Merged
Conversation
…batch it is meshed in, so the default export no longer holds every wall's graph at once (#1690) extract_in_batches_with_control read every owner's graph first and kept all of them until the last batch; since RE-388 the owners include every wall (about 1.6 MiB each, #1429). Each owner is now read once for what its graph names and its size, let go, and read again with its batch; owners that name no symbol are batched by their graph objects.
…s and meshed a buffer at a time, so the saved-mesh pass no longer holds every wall's graph (#1690) The first version read each owner again with its batch, one extract_graphs walk per batch (rvtDevelop's review: each call walks every partition that holds a selected id). The owners that name nothing and that no owner names are now let go after the first read and read once more, in a single pass whose callback meshes the buffer when it holds 20,000 graph objects; the batches that follow see only owners that name symbols or owners.
This was referenced Nov 11, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
…e measured time and memory of the saved-mesh default (#1694) Measure run 42956917709's timing job, 0.17.0 against the source of main from #1691 on, one runner per file, the median of three exports: the 28 samples of Revit 2023 to 2027 take 1.13 to 1.85 times the time and 1.41 to 4.38 times the peak memory, files of Revit 2015 to 2022 at most 2% more time. The office, Core Interior and Snowdon Towers Architectural figures, the IFC sizes (the export logs of run 42949360321) and the viewer's wasm memory (Deploy viewer run 42957158734) replace the figures of #1191's first measurement, which the walls' joining the pass (RE-388) had moved.
4 tasks done
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
## Summary Release 0.18.0. Everything merged since 0.17.0 (61 pull requests, `main` at 979ec42): every element that would be a bounding box drawn from the mesh Revit saved for it by default on Revit 2023 to 2027, roofs, railings, instances and curved surfaces read for it, railings aggregated under their stairs, the quantities and properties of the bodies drawn from meshes (walls, mullions, panels, roofs, floors, openings, round columns), four more "Export to IFC As" values, unique type GlobalIds, standalone family revolutions, a reason on every box that stays one (#1645), and a cut in the saved-mesh pass's peak memory on large files (#1690), with a part that remains (#1694). puzzbobb's #1620 and #1633 and BIM4GIB's #1628 and #1632 are credited in the introduction. The release's own Measure found a cost #1191 had not disclosed: the default export of a Revit 2023 to 2027 file took 1.4 to 4.4 times the peak memory of 0.17.0 (Core Interior 305 to 647 MiB, Snowdon Towers Architectural 1,072 to 3,964 MiB). #1691 cut the large files' share without changing a body (Core Interior 437 MiB, Snowdon Towers Architectural 2,086), and what is left is 1.1 to 1.9 times the time and 1.4 to 4.4 times the peak memory on Autodesk's samples of Revit 2023 to 2027, the most on the small `rac_basic` samples (200 to 875 MiB), which #1691 did not move. The notes, README, docs and help text state the measured figures, and #1694 tracks the rest. The project owner was shown these figures before the release was armed and chose to tag with them stated (2026-11-11). ## Changes - Version 0.17.0 -> 0.18.0 in: - Cargo.toml; - rvt-py/Cargo.toml and its `=` pin; - rvt-mcp/Cargo.toml and its `=` pin; - rvt-wasm/Cargo.toml; - tools/stream_evidence/Cargo.toml's pin; - viewer/package.json; - CITATION.cff (version and date); - Cargo.lock and fuzz/Cargo.lock. - `python3 tools/release/changelog.py assemble`: 42 fragments go into `[0.18.0]`, with an introduction, what is not measured, the measured bullets and "Upgrading from 0.17"; #1690's entry arrived after the assembly and is written into `[0.18.0]` Fixed by hand. - README: the latest release, the "Upgrading from 0.17" and "after 0.18.0" fragments sentence, and two sentences that still described roofs on Revit 2023 to 2027 and the saved-mesh default as limited to family instances (`docs/evidence.md` row likewise). - The Core Interior witness observations and verdicts, and the synthetic fixtures, from this pull request's CI run 42949885323: only `witness_version`, the verdict hashes and the fixtures' version strings differ. - The measured cost of the saved-mesh default replaces #1191's first figures (24.4 s and 1,423 MiB against 21.2 s and 913, "1% to 17% more time and up to 59% more peak memory"): the changelog, README, `docs/python.md`, `docs/release-1.0-criteria.md`, `docs/support-matrix.json`, the `--no-saved-meshes` help text of `rvt-ifc` and `rvt-gltf` and the module doc of `src/ifc/saved_meshes.rs` quote Measure run 42956917709; the viewer's wasm memory in the changelog and `docs/viewer-api.md` is Deploy viewer run 42957158734 on `main` at 979ec42 (Core Interior 308 to 383 MiB, not 324). The source changes are help text and doc comments only. ## Testing - `python3 tools/ci/release_preflight.py check --event workflow_dispatch --ref-type branch --ref-name chore/release-0.18.0 --sha HEAD`: ok, version 0.18.0. - `python3 tools/release/changelog.py check`: ok. `rustfmt --edition 2024 --check` on the three Rust files: ok. - The release's baseline Measure, `main` at 8334726 against v0.17.0 with every flag, the held-out models and timing: run [42949360321](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42949360321), read into the changelog's "Measured against 0.17.0" bullets; #1691 moves no export, run [42954375538](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42954375538). - The timing of the final code: run [42956917709](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42956917709), v0.17.0 against #1691's head (the same source as `main` from 979ec42: `git diff --stat` over src, Cargo.toml and Cargo.lock is empty), one runner per file, the median of three exports, 58 files. - The dry run RELEASE.md step 7 asks for: `publish.yml` dispatched on this branch at b001cb3, [run 42949890449](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42949890449), every job green (the wheels installed and opening a model, `cargo install` with the CLI sample, the docs.rs preview, the viewer load smoke), and again at bd6875d after #1691 and the notes: [run 42959626601](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42959626601); the head since moved two commits that change CHANGELOG.md only: 4762e14 (the table's own minimum peak ratio, 1.42, an introduction sentence on the cost, a bullet's lead) and 13373e7 (every cost reads from 0.17.0's figure to 0.18.0's). Nothing was published. - The same-project gates, which `arm.sh` needs on a commit holding the PR's edits under `src/` (help text and doc comments only): Measure run [42961127420](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42961127420) on 4762e14, `samples=true`, default scorers: pass, 15 samples held to their earlier saves and the Areas on 4 saves and on the 2021 save. Unit tests: N/A. ## Audit-honesty checklist - [x] Each entry keeps its caveats; the introduction lists what is not measured. - [x] The saved-mesh cost is the measured one, with what is still above 0.17.0's named (#1694). - [x] No emojis, private paths or PII. ## Legal and contribution hygiene - [x] Apache-2.0. No Autodesk source, internals or NDA material. ## Breaking changes The saved-mesh default and its library names (`SavedMeshChoice::Default`, `saved_meshes::default_scope`, new `SavedMeshChoice::DoorsAndWindows`), listed under "Upgrading from 0.17".
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
… of the symbols they read, sized before any is decoded (#1694) (#1701) ## Summary The saved-mesh pass cuts its batches of shared symbols by the bytes of record body they read, sized before any symbol is decoded, instead of from the objects per symbol of the batch before. The default export's peak memory falls from 875 to 889 MiB to 360 to 392 on Autodesk's `rac_basic` of 2023 to 2027, from 1,790 to 1,396 on Snowdon Towers Architectural, from 934 to 1,001 to 724 to 792 on `rme_advanced` and `rme_basic`, and from 1,439 and 1,550 to 1,301 and 1,436 on the BIM4LCA office. No export changes (126 of 126 byte-identical) and no timed file takes more than 2% longer. ## Motivation #1694 (the pass's peak memory after #1691). Its dhat run named the holder, the decoded graph objects (Measure 42960663793), and its batch-plan probe (Measure 42973819930) found that the plan sizes each batch as `20,000 * records / objects` of the one before it while the symbols sort by id with the largest last, so a batch that meets them holds several times its budget. Rows were registered on the issue before every run: #1694 (comment) (the fix's rows), the results at #1694 (comment) and #1694 (comment), and the two levers tried and not carried (a budget of 1,000,000 bytes, and not keeping the owners' graphs) at #1694 (comment) and #1694 (comment). ## Changes - `src/research/native_saved_scene.rs`: `body_sizes` (one `extract_graphs` walk with `Options::graph_classes` empty, so each selected record comes back with its Element base and `body_bytes` and no graph is built) and `batch_end` (a pure function: a batch takes owners while the bodies of the symbols they name, each counted once, stay within `BATCH_BODY_BUDGET` = 2,000,000 bytes, always at least one owner, and the owners that name no symbol stay a batch of their own). `BATCH_OBJECT_BUDGET` and the first-batch, minimum and maximum symbol counts are gone. Seven failure-first tests of `batch_end` (an owner over the budget is a batch of its own, a zero budget advances, a shared symbol counts once, a symbol with no size counts nothing, sizes that overflow do not wrap, symbol-free owners stay apart, the budget is a ceiling the batch may reach). - `changelog.d/fixed/1694-saved-mesh-batches-by-bytes.md`. ## Testing Measured end to end on the Measure runner (no local builds here; the pure planner's tests also compile and pass in a standalone rustc harness): - unfiltered with `timing` against `main` 5f928b4 (every flag, every scorer, 126 models each side), [42977559276](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42977559276) on the fix (`81a4b59a`): **126 of 126 exports byte-identical**, no scorer line moves, `same-project gates` pass; time reads 0.95 to 1.02 on the 68 timed files (offices 1.01, Snowdon Architectural 1.02); the export's peak memory, base to head: `rac_basic` 2023 to 2027 875, 889, 887, 887, 888 to 360, 378, 376, 375, 392 MiB; `rme_advanced` 2024 to 2027 981, 968, 970, 971 to 792, 783, 784, 787; `rme_basic` 945, 934, 934, 1,001 to 734, 724, 724, 724; Snowdon Architectural 1,790 to 1,396; Snowdon Electrical 757 to 643; the BIM4LCA office as built 1,439 to 1,301 and at permit 1,550 to 1,436; Core Interior, Snowdon Structural and `rac_advanced` unchanged. Two files rose: Snowdon HVAC 366 to 410 and RE1 Architecture 160 to 186 (their symbols come to one or two batches under the budget, which the old first batch of 8 symbols did not allow); - `probe_1075_saved_batches` (the batched read makes the same elements as the one-shot read, four selections of owners per model, exits with an error on any difference), [42977555634](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42977555634): `identical true` on 19 of 19 models; - `probe_1075_heap_stages` at the fix against the same probe at its base, [42977552233](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42977552233) and [42979872560](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42979872560): the pass's peak over its start, `rac_basic` 630.7 to 166.0 MiB, `rme_advanced` 500.0 to 291.7, Snowdon Architectural 869.9 to 558.5, Snowdon Electrical 318.6 to 228.7, with the same triangles on all 19 files. - the fix merged with `main` (which now holds RE-423's beams, whose read cost the 11 Autodesk files in #1699 their time and memory), the same unfiltered run with timing: [42983301930](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42983301930), its result goes on this PR. - [ ] `tools/check-local.sh`: not run locally (no local builds here); CI builds and tests it - [x] Verified end to end on real Revit files: the runs above, read against the rows registered on #1694 - [x] IFC output unchanged: 126 of 126 `ifc.sha256` equal - [x] Performance change: the timing table above is the before and after ## Audit-honesty checklist - [x] Changelog fragment under `changelog.d/fixed/` - [x] Limitation stated: two files peak a little higher (above), and `rac_advanced` and Snowdon Structural do not move (their peak is not a batch: the owners the pass keeps while the batches run, which a lever not carried here takes out at 8 to 26% more stage time) - [x] No emojis, no private paths ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk proprietary source, decompiled internals or NDA'd SDK content ## Breaking changes None. ## Related issues Refs #1694 (it stays open until the pass is measured against 0.17.0 again).
7 of 8 tasks
DrunkOnJava
added a commit
that referenced
this pull request
Nov 11, 2026
…g reads (#1694) (#1717) ## Summary The saved-graphics pass builds only the fields of a graph that meshing reads (`Options::graph_fields`, the projection #1335 added for the walls, levels, pipes and ducts). No export changes: 125 of 125 exports of an unfiltered Measure are byte-identical. The pass's peak memory falls 6% to 10% and a default export's 3% to 7% (0.93 to 1.00 times on one runner); the registered bar of 0.85 is missed, and the next lever is read on the issue (a pointer value is a three-entry map of about 730 bytes). ## Motivation #1694: after #1691 and #1701 the default export's peak memory on Revit 2023 to 2027 files is still 1.3 to 2.5 times 0.17.0's. The dhat run of the pass ([42996084734](https://github.com/DrunkOnJava/rvt-rs/actions/runs/42996084734)) puts 77% to 87% of its peak in the decoded graph nodes (`class_in`, `field_as`, a map entry with its own key `String`, about 150 bytes each, 1.33 million on `rst_basic` 2023), and the pass reads a small part of what a graph holds. Rows were registered on [#1694](#1694 (comment)) before the runs. ## Changes - `src/research/native_saved_scene.rs`: `SAVED_GRAPHICS_FIELDS`, the 66 `m_` names (keys inside a field's value included, and `m_id`) that the seven modules reading a graph object between a graphics record and a mesh use as string literals (`native_saved_mesh`, `native_graphics_traversal`, `native_parametric_mesh`, `native_parametric_surface`, `native_empty_faces`, `partition_instance_transforms` and this one), and `saved_graphics_fields`, which both extraction paths (`extract_impl`, `extract_in_batches_with_control`) set as `graph_fields`. `decode_graph_projected` reads and checks every field as the full decode does and builds only the listed ones, so a graph is refused for the same reasons and a field left out reads as absent. None of those modules iterates a graph's fields or reads a qualified (`Declaring::name`) key. ## Testing Measured on the Measure runner, no local build. Rows registered before the runs on [the issue](#1694 (comment)), read on [the issue](#1694 (comment)); head `af2d861c` against `main` `a0dd7813`: | run | what | read | |---|---|---| | [43026045106](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43026045106) | unfiltered, every flag | row 1 held: 125 of 125 exports byte-identical; `same-project gates` pass | | [43026049770](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43026049770) | `timing`, 2023 and 2024 samples, offices, reference models (29 files) | row 2 missed: peak 0.93 to 1.00 (`rac_basic` 2023 0.96, Snowdon Architectural 0.97, offices 0.96 to 0.97; 0.85 asked); row 3: time 0.98 to 1.03 on 28 files, `rac_advanced` 2023 1.05 | | [43026053891](https://github.com/DrunkOnJava/rvt-rs/actions/runs/43026053891) | `probe_1075_heap_sites`, Autodesk's 2023 samples | row 4 missed: the decode is 75%, 75% and 86% of the pass's peak (from 86%, 77%, 87%; 50% asked); the peak falls 166.1 to 155.5, 309.1 to 279.6, 233.8 to 213.9 MiB | - [ ] `tools/check-local.sh`: no local build here; the PR's own CI runs fmt, clippy, rustdoc and the test matrix - [x] Verified end to end on real Revit files: the rows above ## Audit-honesty checklist - [x] Docs reflect what ships: no capability changes; the memory cost is the issue's table, which the 0.18.0 notes state - [x] A user-visible change has its fragment (`changelog.d/changed/1694-saved-graphics-fields.md`) - [x] Commit messages say what and why - [x] No emojis; no private paths ## Legal and contribution hygiene - [x] Apache-2.0; no Autodesk proprietary source or NDA'd SDK content - [x] No fixtures added ## Breaking changes None expected: row 1 is that no export moves. ## Related issues Refs #1694.
This was referenced Nov 12, 2026
DrunkOnJava
added a commit
that referenced
this pull request
Nov 19, 2026
…s the release (#1808) (#2090) ## Summary `main` gains the `## [0.14.1]` section of `CHANGELOG.md`, word for word as the `v0.14.1` tag has it, between 0.15.0 and 0.14.0, and the roadmap's list of releases gains an entry for it. ## Motivation RELEASE.md, "Hotfix process", step 7: a patch to an older line brings `main` its changelog section only. v0.14.1 was tagged on `hotfix/v0.14.1` on 2026-11-19 for #1808 and is published: release page, crates.io (`rvt` and `rvt-rs-mcp`), PyPI and the container image `0.14.1`. 0.25.0 is still the latest on each. ## Changes - `CHANGELOG.md`: the 0.14.1 section (47 lines), taken from `git show v0.14.1:CHANGELOG.md`. - `ROADMAP.md`: one entry in the list of releases. `main`'s version files, README and install page stay 0.25.0's. `main` has held the fix itself since 0.15 (#1691, #1441). ## Testing Unit tests are banned in this repository. Two Markdown files; no output changes. - [x] `tools/release/changelog.py check` passes. - [x] The release was checked after publishing: every file on the release page against `SHA256SUMS`, the 8 PyPI files against the release page, 13 of 13 attestations against `refs/tags/v0.14.1`, and the tag's export of the three reference models against 0.14.0's (three lines differ in each: the header's time and version, the application's version, the owner history's time). ## Audit-honesty checklist - [x] The roadmap entry keeps the release's caveat: 0.14.1 was not run on the reporter's model before it shipped. ## Legal and contribution hygiene - [x] Apache-2.0. No new fixtures. ## Breaking changes None. https://claude.ai/code/session_01NCFPVqpXUmLDmXf35nPPeP
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.
Summary
The saved-mesh pass held every owner's decoded graph from its first read to its last batch. Since #1629 (RE-388) the owners include every wall, whose graph is about 1.6 MiB (#1429), so the default export of a Revit 2023 to 2027 file took 1.4 to 4.4 times the peak memory of 0.17.0 (Core Interior 305 to 647 MiB, Snowdon Towers Architectural 1,072 to 3,964). The owners that name nothing and that no owner names are now let go after the first read and read again in one pass whose callback meshes a buffer of about 20,000 graph objects (about 95 MiB) at a time; the batches that follow see only owners that name symbols or owners, kept as before. It is meant to change no body.
Motivation
Fixes #1690, found by the 0.18.0 release's baseline Measure (run 42949360321): the table, the bisect to a8a126f and the rows registered before this run are on that issue. #1191 told the maintainer 1% to 17% more time and up to 59% more peak memory; the measurement at
mainwas 1.13 to 2.12 times the time and 1.42 to 4.37 times the memory on the 28 samples of Revit 2023 to 2027.Changes
src/research/native_saved_scene.rs,extract_in_batches_with_controlonly: the first read keeps the references of every owner and the graph of the owners that name something; oneextract_graphsover the owners that name nothing and that no owner names meshes a buffer of them atOWNER_OBJECT_BUDGETgraph objects as it reads (mesh_buffer); an owner a batch's owners name that was not kept is read with that batch (and kept, as named owners are: they are never dropped, as before, and their graphs are not counted in the batch).changelog.d/fixed/1690-saved-mesh-owner-memory.md.Testing
No unit tests added. Measured end to end on Measure's models: the unfiltered run of this head against
mainat 8334726, every flag, with timing (run 42954375538), judged against the rows registered on #1690; the full result is there (comment on #1690).0 of 126 exports move against
main(byte-identical) and no diagnostics line differs.Peak memory: Core Interior 647 to 437 MiB, the office as built 2,051 to 1,432, Snowdon Towers Architectural 3,960 to 2,099; time +1% to +3%; the 28 samples of Revit 2023 to 2027 0.97 to 1.04 in time and 0.53 to 1.05 in peak. One row missed (Core Interior 437, not 400 or less). The growth still left against 0.17.0 (1.4 to 4.4 times) is Default saved meshes: after #1691 the peak memory is still 1.4 to 4.4 times 0.17.0's on Revit 2023 to 2027 files; where the rest sits #1694.
full / CI passed, the same-project gates and the semantic diff pass on 8cf93e9.tools/check-local.shpasses: not run locally (no local builds here); CI's full run is green on this head (rustfmt --checkon the file passes)Verified end to end on real Revit files: Measure run 42954375538, above
If this touches the IFC exporter: the witness verdicts replay or the changed observations are refreshed: no export moves (0 of 126 byte-different)
If this is a performance change: the run above reports time and peak against
mainfor every fileAudit-honesty checklist
changelog.d/fixed/Legal and contribution hygiene
Breaking changes
None. Peak memory falls and time rises by the further read of the owners per batch; no output changes if row 1 holds.