Repository navigation
Description
What
On the 2015 to 2023 path of partition_schema_mvp, two native passes read records another pass of the same export has already read. Read on main at 97397b9.
- Every wall record is read twice; the second read exists only for the top join.
native_walls_and_top_joins_into(src/research/native_walls.rs:808, called fromattach_wall_layers) reads each wall'sSWall/ArcWallrecord whole. It keeps type ids, Functions and bearing inWallReads(:1076-1081), but not the top join it also reads.- So
read_wall_records(partition_schema_mvp/walls.rs:993) callsWallReads::readagain over every wall (native_walls.rs:680, selectiontype_walls ∪ join_walls), only to getm_wall_top_joined. - Each wall then carries
m_wall_top_joinedtwice: fromwalls.rs:1184(the first read) andwalls.rs:1084(the second). The one consumer,export_content.rs:3025-3032, takes the first. - Keeping
top_joinedandtop_joins_readinWallReadsthere, and passing every wall id, would make the second read's selection empty. That saves oneextract_graphscall and the projected decode of every wall, with the same value on the same record.
- Every
GStyleElemis read twice on a file with walls and curtain parts.partition_curtain_materials::category_material(:122) andpartition_materials::category_style_materials(:613) both select everyGStyleElem. Only the second is memoised on the handle.- Their rules differ: the first filters to known materials and needs every style equal, the second needs exactly one distinct value. So a fold keeps both rules over one read.
A question to settle first
category_style_materials sets no releases, so it runs on Options::default()'s 2023 to 2027. On 2015 to 2022, extract_records refuses it ("this native reader is not measured on Revit {version}"), and scan_category_material swallows the refusal (partition_materials.rs:585). The RE-91 graphics-style fallback for wall layers therefore reads nothing on 2015 to 2022, while the curtain reader sets NATIVE_RELEASES.
That may be deliberate, a measurement boundary, or an omission. Folding (2) would extend the curtain reader's range to the wall-layer path, so it has to be decided first. Deciding needs a 2015 to 2022 file whose Walls object-styles entry is unset and whose Walls GStyleElem names a material, together with Revit's export of it.
Done when
- (1) is folded. An unfiltered Measure shows every export byte for byte as before, and a timing run shows the 2015 to 2023 samples no slower.
- (2) is folded, or left with the reason; the release question above is answered with the file that settles it.
Found by a Tendrils audit worker; the code references were checked by rvtDevelop.
Activity
perf(research): the first wall read counts as read only the walls who…
DrunkOnJava commentedon Nov 12, 2026
A note from #1828's review, outside its scope.
native_walls_and_top_joins_intomarks every wall it was asked for as having its load bearing read (reads.bearing_read.extend(walls)), including a wall whose whole graph did not decode. Such a wall never gets the second chance inWallReads::load_bearing's projected read, which builds far less. The same applied to the top joins until #1828 marked only the walls it found one for.On the models measured so far it moves nothing: a wall whose whole graph fails to decode has not been seen in a Measure run. It would matter only for a wall whose record busts
max_graph_valuesin full but not projected. The fix would be the same as #1828's,bearing_read.extend(bearing.keys()), and it is left for when such a wall turns up.perf(research): the first wall read also reads the walls with no type…
research: an opt-in ledger keeps every native pass a thread makes, wi…
perf(research): the wall read that draws a Revit 2015 to 2023 export'…
DrunkOnJava commentedon Nov 14, 2026
Where this stands on
main(2b4f18b):Wall records read twice: done by perf(research): the wall read that draws a Revit 2015 to 2023 export's walls keeps their top joins, so the export does not read every wall's record again for them (#1824) #1828 (925c482).
native_walls_and_top_joins_intokeeps each wall's top join inWallReads(top_joined,top_joins_read,src/research/native_walls.rs:1164-1175), soread_wall_records' secondWallReads::readhas nothing left to select.GStyleElemread twice: narrower than this issue says. The two readers run on different releases:partition_curtain_materials::category_materialruns only whereCURTAIN_32BIT_REVIT_VERSIONSholds (2015 to 2023,partition_schema_mvp/materials.rs:337);partition_materials::native_category_materialruns onOptions::default()'s 2023 to 2027, and only where the object-styles entry gives no material.So the second read happens only on a Revit 2023 file that has both curtain parts and walls with no object-styles material. A fold saves at most one
GStyleElempass on such a file. It also needs care: the two readers decode ids differently (native_metadata::identifieragainst/m_id/m_id64only), so one shared read has to keep both decodings to leave the exports as they are.The release question above (whether the wall-layer fallback should read 2015 to 2022) is unchanged. It still needs a 2015 to 2022 file whose Walls object-styles entry is unset and whose Walls
GStyleElemnames a material, with Revit's export of it. That question, not the saving, is what keeps this open.