Skip to content

perf(research): each read of the saved-graphics pass visits only the partitions holding a record it selects, from a record index of its own channel (#1694) - #1817

Merged
DrunkOnJava merged 2 commits into
mainfrom
perf/1694-graphics-record-index
Nov 12, 2026
Merged

DrunkOnJava merged 2 commits into
mainfrom
perf/1694-graphics-record-index

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Each read of the saved-graphics pass visits only the partitions that hold a record it selects (#1694). The handle's record index answers that without a walk, but it held only the elements' records (channel 102), and a read used it only when it selected the default channels. The saved-graphics pass reads channel 103 alone, so every one of its reads walked every partition twice, once to find its records and once to decode them, whatever it selected. The handle now keeps an index for each channel a read selects alone, built by the first such read. This is a draft until the timing read; the rows are registered on #1694 (comment, run A).

Motivation

#1813's timing run showed the pass's reads costing far more than the batches select. Reading the code put the cause here, and #1813 depends on it.

Changes

  • RevitFile keeps one record index per channel (native_record_indexes, native_record_index_of). native_record_index() is channel 102's, as before, so element provenance and the type parameters' record starts read exactly what they did.
  • extract_records (native_document.rs) uses, and on its first read builds, the index of the one channel a read selects, under the same budget and unread-partition conditions as before.
  • changelog.d/changed/1694-graphics-record-index.md.

Testing

Pending: the timing run (43277786356) against the rows, an unfiltered run for the exports on the final head, and full / CI passed.

Related issues

Refs #1694. #1813 holds this change merged with its uncached walks.

…partitions holding a record it selects, from a record index of its own channel (#1694)
…s records, built by the first read of that channel alone (#1694)
@DrunkOnJava

Copy link
Copy Markdown
Owner Author

The unfiltered run is read: exports unchanged. Run 43287191948, head 86ee8199 against main 97397b9e, with the samples, the BIM4LCA models, the R2025 set, rac_advanced, BIMcollab and the held-out models.

  • Every ifc.sha256 and every scorer file equals main's.
  • The scorer diff lists only areas_across_saves.txt and areas_across_saves_2021.txt. They exist on the head side alone, as in run A (43277786356).
  • Every job passed, and the same-project gates pass on 86ee8199.

The head is now 57fda5ec, which changes only the RecordIndex rustdoc on top of 86ee8199. Marked ready for full CI.

@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 12, 2026 19:45
@DrunkOnJava
DrunkOnJava merged commit 45471a3 into main Nov 12, 2026
63 checks passed
@DrunkOnJava
DrunkOnJava deleted the perf/1694-graphics-record-index branch November 12, 2026 20:12
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