iTwin / imodel-transformer

API for exporting an iModel's parts and also importing them into another iModel
MIT License
3 stars 2 forks source link

Potential speed up - linear traversal of source #6

Open MichaelBelousov opened 1 year ago

MichaelBelousov commented 1 year ago

The iModel transformer was originally designed around the concept of a deferral queue for handling unresolved references, so it was optimal to traverse the iModel in definition hierarchy order. This causes a lot of unnecessary querying that is no longer necessary now that the transformer no longer uses that concept of deferral.

We should be able to just loop through the entire bis.Element table and export each one in order, potentially handling the rare cases where a required reference (e.g. ViewDefinition->modelSelector) was updated to be an earlier one.

MichaelBelousov commented 1 year ago

some experimentation needs to be done to see if linear traversal causes more updates to be necessary from unresolved references.

MichaelBelousov commented 10 months ago

see early-polymorphic-insert branch