pub fn extract_data_model_with<T>(
content: &T,
options: DataModelOptions,
) -> DataModelExtractionExpand description
Extract the data model, building entity metadata only for the rows
options.entities asks for. Returns it with the number of STEP instances
the scan saw (DataModelExtraction).
DataModelEntities::Rooted narrows the table to exactly what
DataModelEntities::apply leaves, but it does so BEFORE the metadata is
built rather than after. Over various/O-S1-BWK-BIM architectural that is
211,716 rows built instead of 4,411,807 – six owned Strings each. The
result fits either way; the peak is what a caller with a memory ceiling
cannot afford (#9582).
The output matches extract_data_model followed by apply table for
table, which rooted_tests.rs asserts directly on real models. That holds
only while every other table is built first; see [rooted::metadata_jobs]
for the ordering condition and the proof that the spatial hierarchy – the
one table the pre-filter cannot consult – needs no special handling.
DataModelEntities::All is the default path and is untouched by this: it
borrows the full job list rather than copying it, and its metadata pass
still runs in the same rayon::join beside the other extractors.