Skip to content

perf(ifc): read only the Levels' own records for a storey's EntranceLevel, and none where no parameter is named for it - #1227

Merged
DrunkOnJava merged 2 commits into
mainfrom
perf/storey-narrow-read
Oct 31, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
perf/storey-narrow-read

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

From the read-only code-quality pass (item 4). Each storey's EntranceLevel (RE-275) was read through native_element_parameters::read. That read selects every FamilySymbol, Family, MaterialElem and system type record by class, so it can add type values and name ElementId values. A Level has no type, and only its own instance value is used.

Output is unchanged by construction: a Level has no master symbol, so the class-selected records never contributed to it. A Measure run with timing and every model checks byte identity and time, against the merge base 08c6a627.

No changelog fragment (no user-visible change).

Measured (41213627883, against 08c6a627 on one runner, median of three alternating runs per file):

  • Byte-identical on all 90 exports.
  • rvt-ifc time for all 66 timed files together: 483 s before, 449 s after (median file 0.92).
  • On 51 files, every run with the change beat every run without it: most samples by 7 to 13%, the MEP samples by 3 to 13%, and the BIM4LCA office at permit by 3%.
  • The other 15, mostly the structural basic samples, Einhoven and Core Interior, are within noise. Ten of their medians are higher, by 3 to 28 ms (at most 2%), and their runs overlap with the base's.

The gain comes from files that define no EntranceLevel parameter. They no longer pay for a native pass over every type, family and material record.

…evel, and none where no parameter is named for it
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review October 31, 2026 16:19
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

Automated Claude Code review (the maintainer's review agent; it read the diff and the Measure artifacts and ran nothing heavy): ready, no blocking or should-fix items.

  • Output unchanged by construction:
    • A Level never gets type values: only FamilyInstance and the seven system-type links have a master symbol.
    • storey_properties keeps only instance booleans, so target names cannot matter.
    • extract's definitions pass, the registry's only source, runs with the selection cleared, so it does not depend on the selection.
    • The ids are never empty, so an empty class set selects exactly the Levels' records, not everything.
    • Measure 41213627883 built this head: all 90 ifc.sha256 and the diagnostics match. The office covers the path where EntranceLevel is defined; the other 88 cover the path where it is not.
  • The filter cannot miss a name the old code matched: ElementParameter.name is the definition's caption, from the same registry the filter scans, compared exactly against the same two constants.
  • read_defined is unchanged for its other caller. It builds the same class set through read_selected(.., true).
  • One difference, a gain: the old read walked every partition holding a type, family or material record, so an error in any of them dropped every Level's EntranceLevel. The new read does not walk them. No corpus export differs.
  • Nits, addressed or noted:
    • The timing wording now gives the ten files whose medians are up to 2% higher.
    • read_own_defined is for elements with no type, as its doc says.
    • The office, which defines EntranceLevel, still pays the definitions pass; the gain is on files that do not.

@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) October 31, 2026 16:22
@DrunkOnJava
DrunkOnJava merged commit ad0aaeb into main Oct 31, 2026
28 checks passed
@DrunkOnJava
DrunkOnJava deleted the perf/storey-narrow-read branch October 31, 2026 16:27
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