You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: models with a partition stream over 256 MiB open empty, with no error #1075
area:readerWork in the reader area.communityFrom a contributor outside the maintainerspriority:P1High-impact work needed for the MVP or beta path.type:bugCorrectness defect or regression.
Large real-world models open with zero elements and zero levels and no error. They keep almost all of their content in a single partition stream that exceeds the default 256 MiB stream limit (DEFAULT_MAX_STREAM_BYTES, reader.rs). The read failure is swallowed, so rvt-ifc writes an empty model; the diagnostics only show walker-max-record-decode-bytes: walker candidate decode stopped.
rvt-rs version
0.6.1 (also checked 0.10.0: same files empty)
Revit release the input file came from
2024
Input file size (bytes)
Two files: about 438 MB and 1.13 GB on disk. The biggest stream in each: Partitions/189 at 402.7 MiB and Partitions/0 at 1056.8 MiB, before inflation. A 202 MB model whose biggest stream is 141 MiB reads fine.
The model's elements. With three limits raised (DEFAULT_MAX_STREAM_BYTES to 2 GiB, DEFAULT_MAX_INFLATE_BYTES to 6 GiB, walker max_scan_bytes to 6 GiB) the two files read as 9,917 elements on 35 storeys and 21,021 elements on 14 storeys, at 3.7 GB and 5.1 GB peak memory.
Suggestions: report a stream over the limit as a clear error or a diagnostics entry instead of an empty model, and consider higher defaults or one documented knob for all three limits. The files are client work and can't be shared; happy to test a build.
Thank you for the measurements, they were enough to find it without the files.
What happened. At 0.10.0 almost every partition reader skips a partition it cannot read and goes on (about 87 of the 93 call sites drop the error), so a Partitions/NN over the 256 MiB stream limit was skipped by all of them, with no diagnostic and exit status 0. One more thing your raised-limit run may have hit: the inflated total of one partition was capped at a literal 1 GiB that no limit raised, and a partition past it was cut at a member boundary, silently. If Partitions/0 (1,056.8 MiB stored) inflates past 1 GiB, your 21,021 elements may be a truncated read.
Every stream a limit stops is recorded and listed in the diagnostics (stream_not_read_resource_limit, one Not read whole: warning per stream with its stored size, the limit and which one).
rvt-ifc and rvt-gltf write no model and exit with status 3 unless --allow-partial.
--large-model raises the limits (streams up to 2 GiB, 8 GiB inflated, walker scan 8 GiB); --max-stream-bytes and --max-inflate-bytes set them yourself. A stream's inflated total is now max_inflate_bytes or 1 GiB, whichever is larger, so raising one raises the other.
Python: write_ifc() raises ValueError while a stream is unread unless allow_partial=True, and RevitFile.unread_streams() lists them.
If you can check it on your two files (no file needs to leave your machine):
(/usr/bin/time -l on macOS.) The numbers that would settle it: the exit status and stderr lines of the first run, and for the second the element counts by IFC class and the storey count from the summary line, whether d.json still lists any stream_not_read_resource_limit item, the peak resident memory and the wall time, and whether the counts differ from your 9,917 / 35 and 21,021 / 14. --anonymize keeps counts and ElementIds and drops names; the counts alone are enough. The 202 MB model that reads today, as a control, should come out unchanged.
I'll keep this open until we hear how your files do. Your #421 report is a separate fix (#1081); more there.
@hemanth1986, the fix for models whose partition streams are over the reader's limits shipped in v0.11.0. We measured it only by lowering the limits below our reference files' streams. No model over the default limits has been read with --large-model yet, so your models are the real test.
If you can run it on the ones that came out empty:
The first should exit with status 3, write no IFC and name each stream it could not read. The second should read them and export the model. Counts only would tell us whether it works:
the exit status of each run;
the streams the first run names, with their sizes;
the elements and storeys the second exports;
its peak memory and time if you can see them (/usr/bin/time -v on Linux, Task Manager on Windows).
In the viewer, the File status panel offers 'Retry with large-model limits'. A browser tab is capped at 4 GiB, so a very large model may still fail there, and the CLI is the better test.
0.14.0 is released with the memory work from this thread (#1329). The cache of inflated partitions no longer holds each partition twice, the native passes strip their pages in place instead of copying them, and the saved graphics of doors and windows are decoded in batches. On the BIM4LCA office as built, the peak resident memory of a whole rvt-ifc run went from 1,690 MiB with 0.13.0 to 913 MiB, and #1329 left every export byte for byte as it was. Your 438 MB model is what this was for, and we can't measure it here: could you run the same probe at the tag and paste its table (memory and counts only)?
git checkout v0.14.0
cargo run --profile ci -p rvt-probes --example probe_1075_memory_stages -- <the 438 MB file> --large-model
@hemanth1986, a change that may touch your 438 MB model's memory is on a branch, and I would like your numbers before it is released.
The change.#1610 (for #1191) draws every family instance that would be a bounding box from the mesh Revit saved for it, by default, on Revit 2023 to 2027 files. Only doors and windows were until now. On the BIM4LCA office as built, the largest model we can measure, it takes the peak from 913 to 1,423 MiB (+56%) and the time from 21.2 to 24.4 s; where a file has few boxed families it costs nothing (Core Interior's peak is 305 MiB either way). What it adds depends on how many boxed elements a file holds, which your counts do not say, so on your model it may be much less, or more.
What would tell us, memory and counts only, as before:
The probe takes the default scope, so its saved meshes row now draws every boxed element: that row's replaced count (279 of 432 in your table of 2026-11-04) and its peak are the numbers, against the 11.41 GiB of that table.
rvt-ifc --no-saved-meshes (Python saved_meshes=False) returns the previous memory, and the release notes will name it. If the new default takes your file past the machine's memory, tell us which stage and by how much, and we will look at it before the release.
@hemanth1986, 0.18.0 is tagged with the change I asked for your numbers on (#1610, for #1191: every boxed element of a Revit 2023 to 2027 file drawn from the mesh Revit saved for it, by default). I did not hear back before cutting it, and the cost measured on the final code is larger than my comment of 2026-11-09 said, so here are the corrected figures and the same request.
What I wrote then, corrected (Measure run 42956917709, 0.17.0 against the released source, one runner per file, the median of three exports):
file
0.17.0
0.18.0
BIM4LCA office, concrete, as built
25.4 s, 914 MiB
33.0 s, 1,432 MiB
Core Interior (2024)
4.7 s, 305 MiB
5.3 s, 437 MiB
Snowdon Towers Architectural (2024)
17.6 s, 1,073 MiB
28.0 s, 2,086 MiB
rac_basic 2023
1.9 s, 200 MiB
3.4 s, 875 MiB
I said the office goes 21.2 to 24.4 s and that Core Interior's peak is 305 MiB "either way": both are larger now, because the pass also reads every wall since RE-388. #1691 (in 0.18.0) brought the large files down (Core Interior 647 to 437 MiB, Snowdon Architectural 3,964 to 2,086 MiB). Across Autodesk's 28 samples of Revit 2023 to 2027 the cost is 1.1 to 1.9 times the time and 1.4 to 4.4 times the peak memory. Files of Revit 2015 to 2022 are within 2% of 0.17.0's time and memory. Where the rest sits is being profiled on #1694: on the samples I can measure it is a transient inside the pass, not the cache of inflated partitions (the 3.38 GB your table of 2026-11-04 showed for your file is that cache), and it is the next thing I fix.
rvt-ifc --no-saved-meshes (Python saved_meshes=False) returns 0.17.0's memory, and the release notes say so.
What would tell us, memory and counts only, as before, on your 438 MB file (and the 1.13 GB one if the machine can take it):
git fetch origin tag v0.18.0 && git checkout v0.18.0
cargo run --profile ci -p rvt-probes --example probe_1075_memory_stages -- <the 438 MB file> --large-model
Compare its saved meshes row (the replaced count and the peak) with the 11.41 GiB of your table of 2026-11-04. If the new default takes your file past the machine's memory, tell me which stage and by how much: that decides what #1694 fixes first.
No rush, @hemanth1986, and thank you for letting me know. The command and the figures to compare against are in my comment above; when you run it, counts and the saved meshes row are all I need. In the meantime rvt-ifc --no-saved-meshes returns 0.17.0's memory if 0.18.0 does not fit on your machine.
area:readerWork in the reader area.communityFrom a contributor outside the maintainerspriority:P1High-impact work needed for the MVP or beta path.type:bugCorrectness defect or regression.
Activity
fix(reader): name every stream a resource limit stops and refuse a pa…
DrunkOnJava commentedon Oct 29, 2026
Thank you for the measurements, they were enough to find it without the files.
What happened. At 0.10.0 almost every partition reader skips a partition it cannot read and goes on (about 87 of the 93 call sites drop the error), so a
Partitions/NNover the 256 MiB stream limit was skipped by all of them, with no diagnostic and exit status 0. One more thing your raised-limit run may have hit: the inflated total of one partition was capped at a literal 1 GiB that no limit raised, and a partition past it was cut at a member boundary, silently. IfPartitions/0(1,056.8 MiB stored) inflates past 1 GiB, your 21,021 elements may be a truncated read.What changed (#1083, merged as c2bb334).
stream_not_read_resource_limit, oneNot read whole:warning per stream with its stored size, the limit and which one).rvt-ifcandrvt-gltfwrite no model and exit with status 3 unless--allow-partial.--large-modelraises the limits (streams up to 2 GiB, 8 GiB inflated, walker scan 8 GiB);--max-stream-bytesand--max-inflate-bytesset them yourself. A stream's inflated total is nowmax_inflate_bytesor 1 GiB, whichever is larger, so raising one raises the other.write_ifc()raisesValueErrorwhile a stream is unread unlessallow_partial=True, andRevitFile.unread_streams()lists them.If you can check it on your two files (no file needs to leave your machine):
cargo install --git https://github.com/DrunkOnJava/rvt-rs --rev c2bb3341 rvt --bin rvt-ifc --locked rvt-ifc model.rvt -o /dev/null # expect exit 3 and the stream lines /usr/bin/time -v rvt-ifc model.rvt -o model.ifc --large-model --diagnostics d.json --anonymize(
/usr/bin/time -lon macOS.) The numbers that would settle it: the exit status and stderr lines of the first run, and for the second the element counts by IFC class and the storey count from the summary line, whetherd.jsonstill lists anystream_not_read_resource_limititem, the peak resident memory and the wall time, and whether the counts differ from your 9,917 / 35 and 21,021 / 14.--anonymizekeeps counts and ElementIds and drops names; the counts alone are enough. The 202 MB model that reads today, as a control, should come out unchanged.I'll keep this open until we hear how your files do. Your #421 report is a separate fix (#1081); more there.
docs: correct the element-set, 2015 and count claims the 2026-10-29 b…
docs: correct the stale statements on parameters, schedules, decoders…
test: delete the never-run unit tests in src, with end-to-end checks …
refactor!: remove the stable API nothing in the workspace uses, befor…
feat(viewer): retry a model the reader's limits stopped, with the lar…
chore(release): prepare v0.11.0 (#1140)
DrunkOnJava commentedon Oct 30, 2026
@hemanth1986, the fix for models whose partition streams are over the reader's limits shipped in v0.11.0. We measured it only by lowering the limits below our reference files' streams. No model over the default limits has been read with
--large-modelyet, so your models are the real test.If you can run it on the ones that came out empty:
The first should exit with status 3, write no IFC and name each stream it could not read. The second should read them and export the model. Counts only would tell us whether it works:
/usr/bin/time -von Linux, Task Manager on Windows).In the viewer, the File status panel offers 'Retry with large-model limits'. A browser tab is capped at 4 GiB, so a very large model may still fail there, and the CLI is the better test.
docs: say that the #421 and #1075 fixes are not yet measured on the r…
docs(profile): record the two field reports' findings and what is not…
30 remaining items
perf(ifc): a saved-graphics batch reads the closure of its owners thr…
fix(ifc): the batched saved-graphics read reports the one-shot read's…
docs(changelog): the export peak entry cites the unfiltered run, 111 …
perf(reader): a large export holds its bytes once, not several times (#…
chore(release): prepare v0.14.0 (#1345)
DrunkOnJava commentedon Nov 4, 2026
0.14.0 is released with the memory work from this thread (#1329). The cache of inflated partitions no longer holds each partition twice, the native passes strip their pages in place instead of copying them, and the saved graphics of doors and windows are decoded in batches. On the BIM4LCA office as built, the peak resident memory of a whole
rvt-ifcrun went from 1,690 MiB with 0.13.0 to 913 MiB, and #1329 left every export byte for byte as it was. Your 438 MB model is what this was for, and we can't measure it here: could you run the same probe at the tag and paste its table (memory and counts only)?ci(docs): every number on the README and the supported profile names …
DrunkOnJava commentedon Nov 9, 2026
@hemanth1986, a change that may touch your 438 MB model's memory is on a branch, and I would like your numbers before it is released.
The change. #1610 (for #1191) draws every family instance that would be a bounding box from the mesh Revit saved for it, by default, on Revit 2023 to 2027 files. Only doors and windows were until now. On the BIM4LCA office as built, the largest model we can measure, it takes the peak from 913 to 1,423 MiB (+56%) and the time from 21.2 to 24.4 s; where a file has few boxed families it costs nothing (Core Interior's peak is 305 MiB either way). What it adds depends on how many boxed elements a file holds, which your counts do not say, so on your model it may be much less, or more.
What would tell us, memory and counts only, as before:
The probe takes the default scope, so its
saved meshesrow now draws every boxed element: that row'sreplacedcount (279 of 432 in your table of 2026-11-04) and its peak are the numbers, against the 11.41 GiB of that table.rvt-ifc --no-saved-meshes(Pythonsaved_meshes=False) returns the previous memory, and the release notes will name it. If the new default takes your file past the machine's memory, tell us which stage and by how much, and we will look at it before the release.docs: every row of the contribution map carries its issue's own title…
feat(ifc)!: every element that would be a box in a Revit 2023 to 2027…
DrunkOnJava commentedon Nov 11, 2026
@hemanth1986, 0.18.0 is tagged with the change I asked for your numbers on (#1610, for #1191: every boxed element of a Revit 2023 to 2027 file drawn from the mesh Revit saved for it, by default). I did not hear back before cutting it, and the cost measured on the final code is larger than my comment of 2026-11-09 said, so here are the corrected figures and the same request.
What I wrote then, corrected (Measure run 42956917709, 0.17.0 against the released source, one runner per file, the median of three exports):
rac_basic2023I said the office goes 21.2 to 24.4 s and that Core Interior's peak is 305 MiB "either way": both are larger now, because the pass also reads every wall since RE-388. #1691 (in 0.18.0) brought the large files down (Core Interior 647 to 437 MiB, Snowdon Architectural 3,964 to 2,086 MiB). Across Autodesk's 28 samples of Revit 2023 to 2027 the cost is 1.1 to 1.9 times the time and 1.4 to 4.4 times the peak memory. Files of Revit 2015 to 2022 are within 2% of 0.17.0's time and memory. Where the rest sits is being profiled on #1694: on the samples I can measure it is a transient inside the pass, not the cache of inflated partitions (the 3.38 GB your table of 2026-11-04 showed for your file is that cache), and it is the next thing I fix.
rvt-ifc --no-saved-meshes(Pythonsaved_meshes=False) returns 0.17.0's memory, and the release notes say so.What would tell us, memory and counts only, as before, on your 438 MB file (and the 1.13 GB one if the machine can take it):
Compare its
saved meshesrow (thereplacedcount and the peak) with the 11.41 GiB of your table of 2026-11-04. If the new default takes your file past the machine's memory, tell me which stage and by how much: that decides what #1694 fixes first.hemanth1986 commentedon Nov 11, 2026
Hi I am sorry I am held with other things, I will try to get over some information in the next few days
DrunkOnJava commentedon Nov 11, 2026
No rush, @hemanth1986, and thank you for letting me know. The command and the figures to compare against are in my comment above; when you run it, counts and the
saved meshesrow are all I need. In the meantimervt-ifc --no-saved-meshesreturns 0.17.0's memory if 0.18.0 does not fit on your machine.test(saved-batches): the batched saved-graphics read and the one-shot…
docs(criteria): the practitioners' reports row passes with the third …