Repository navigation
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
Conversation
… in the export, for their facts alone, so a Revit 2015 to 2023 export makes no second wall pass (#1824) attach_wall_layers asks the whole-record read only for the walls with a type in the export, since only they get layers. read_wall_records and attach_wall_top_joins then ask every wall's type id and top join, so a file with any typeless wall still made a second pass: Measure 43302451503 found one on all 22 rac and rme samples of 2015 to 2023, and none on the 11 rst ones. native_walls_and_top_joins_into takes those walls as facts_only. It reads them in the same pass for their type id, top join and load bearing, and leaves them out of the records it returns, so the walls attach_wall_layers draws are unchanged. A facts-only wall counts as read only where its record was read; one that was not is still read by the reader that asks. wall_facts_only_reads counts them for probe_1824, which now prints them beside the passes.
|
Run 43317496752 (
On both files this change does nothing the base does not.
The rows have no noise clause beyond the two-mode one, though, so I am not relabelling them. Re-time, registered before it runs. Two timed runs, the samples of 2018 and of 2024 (Measure filters samples by year, not by name), same head, same base, the same three rounds in turn on one runner. Only those two files decide:
Outside the rows: Snowdon Towers Architectural 2024 reports |
|
The re-time, read against the rule registered above (comment 6838942032): rows 4 and 5 hold.
Why the first reading was 1.046. The two peaks are one export's two modes, not this change:
Outside row 4's set: Core Interior is 1.04 in the 2024 run (2732 to 2851 ms) and 0.99 in the full run (4484 to 4453 ms). |
Summary
On Revit 2015 to 2023,
native_walls_and_top_joins_intoalready reads each wall's wholeSWallorArcWallrecord and finds whether its top is joined. It now leaves that answer inWallReads, as it already does with the type ids and the load bearing. In the same pass it reads the walls with no type in the export, for their type id, top join and load bearing alone.read_wall_recordsandattach_wall_top_joinsthen find every wall's answer there, instead of reading every wall's record again. This is part (1) of #1824. Part (2), theGStyleElemread and its release question, is not taken here.Motivation
#1824 (1): two passes read the same wall records for
m_wall_top_joined. The second pass,WallReads::readfromread_wall_records, selects every wall only to find the top join the first had read. The one consumer (export_content.rs) takes the first value.The first run showed that keeping the top joins was not enough.
attach_wall_layersasks the whole-record read only for the walls with a type in the export, since only they get layers. The later readers ask every wall, so a file with any typeless wall still made the second pass.Changes
src/research/native_walls.rs:native_walls_and_top_joins_intoextendsreads.top_joinedwith the top joins it read, andreads.top_joins_readwith those walls only.facts_only: walls read in the same pass for their type id, top join and load bearing, and left out of the records it returns. A facts-only wall counts as read only where its record was read.WallReadsmakes (wall_read_passes) and of the facts-only walls read (wall_facts_only_reads), for the probe.src/research/partition_schema_mvp/walls.rs:attach_wall_layerspasses the walls with no type in the export asfacts_only.probes/examples/probe_1824_wall_top_joins_once.rs: the passes and the facts-only walls of the default export, and the top joins read both ways on fresh handles: the whole record (native_walls_and_top_joins) and the projected graph (WallReads::top_joins).changelog.d/changed/1824-wall-top-joins-once.md.Testing
Unit tests are banned here. The evidence is one unfiltered Measure of this head against
main, timed, with the probe on every model. It covers the samples of every year, the BIM4LCA models, the R2025 set,rac_advancedand the held-out models.The first run, 43302451503 on
b49ebda5, was read against the rows below in their first form:rstsamples of 2015 to 2023 made no pass. All 22racandrmesamples made one, and on each one every wall's whole graph decoded. The cause was the typeless walls above.mainat1a9aacc7, was not in the head, so head against base also compared perf(research): the saved-graphics pass of a default export walks the partitions without the handle's inflated copies (#1694) #1813's saving, which the head lacked. That is where its peak readings of 1.08 to 1.49 came from.This head merges
main(at8421e655) and addsfacts_only.Rows, registered before the second run:
ifc.sha256, everydiagnostics.jsonthe run keeps and every scorer file equalmain's.top_joins ... equal=true.export wall_read_passes=0. A sample with a pass is named, with the walls the pass read and why the first read did not cover them.facts_onlyis reported per sample.maintime is 1.00 or less, and no file is above 1.03. Wheremain's rounds of a file fall into two values, each mode is judged on its own.main's. A typeless wall's whole graph is now built where its projected graph was.rustfmt --edition 2024 --checkpasses. CI runs the rest of the gate.Audit-honesty checklist
changelog.d/<section>/probes/examples/states its FACTLegal and contribution hygiene
Breaking changes
None to the stable API.
wall_read_passesandwall_facts_only_readsare new public functions underrvt::research, which isunstable-research.native_walls_and_top_joins_intotakes a newfacts_onlyargument.