Repository navigation
perf(partitions): pipe diameters and fitting sizes read each stream's data objects once (B80) - #693
Merged
Merged
Conversation
… data objects once (B80) scan_pipe_diameters searched every partition stream once per pipe id, and scan_fitting_nominal_diameters once per fitting id, the per-id pattern B70 removed from the MEP systems. Both now walk the stream's cached data objects (RevitFile::partition_data_objects, #691) and keep the objects whose ElementId they want; a value still stands only where every copy agrees. Measure run 37243310000, against main with #691 (both with scratch timing checkpoints): IFC byte-identical on all six models and 36 samples. On the 2025 rme_advanced sample RE-134's step went from 7.82 s to 1.00 s and RE-165's from 6.89 s to 0.01 s, and the export from 28.1 s to 16.2 s.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scan_pipe_diameters(RE-157, in RE-134's step) searched every partition stream once per pipe id, andscan_fitting_nominal_diameters(RE-165) once per fitting id. That is the per-id pattern B70 removed from the MEP systems. Both now walk the stream's cached data objects (RevitFile::partition_data_objects, #691) and keep the objects whose ElementId they want. A value still stands only where every copy agrees, which does not depend on the order the copies are met in.Measure run 37243310000 compares this commit against
mainwith #691, both carrying the same scratch timing checkpoints. The IFC is byte-identical on all six models and 36 samples.Across the 36 samples and six models, export time goes from 201.2 s to 161.6 s. Inside RE-134,
scan_curve_fieldsis 0.73 s of what is left.Note
Low Risk
Behavior-preserving performance refactor on partition parsing; export output is reported byte-identical on measured samples.
Overview
scan_pipe_diametersandscan_fitting_nominal_diametersno longer run amemmemsearch over inflated partition bytes for every target ElementId. Each partition stream is loaded once withRevitFile::partition_data_objects(alongside the inflated buffer), and both scanners walk that object list and keep entries whose id is in the requested set.Pipe scanning still filters
RbsPipeCurveobjects and reads inner/outer diameters atPIPE_INNER_DIAMETER_OFFSET; fitting scanning still parses nominal size from each object's payload. Multi-copy agreement is unchanged—conflicting values still drop the element from the result map.Fitting sizes drops the
verified_data_objectimport because object boundaries come from the cached index instead of rediscovering headers in the raw buffer.Reviewed by Cursor Bugbot for commit a122ecb. Configure here.