Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IVS-307 performance #348

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open

IVS-307 performance #348

wants to merge 4 commits into from

Conversation

aothms
Copy link
Collaborator

@aothms aothms commented Jan 31, 2025

ctx000

Takes about a minute now on the reference model.

The biggest change here is that doing traversal on the relationship directly also enters the elements that the material is assigned to and elements have very deep instance trees due to their representations.

Also, HasAssociations is defined on IfcObjectDefinition

pse001

Main problem here is that for every instance we parse the full data structure again to see what is allowed (because previously the loop was inside the step fn). Nothing that some quick caching cannot solve, but it's a bit ugly because of the dictionary that has to be passed. Could be refactored more elegantly probably, but this is the least intrusive I could think of.

alb023

The reference file had 24197 IfcCurveSegments. Looping over them in the decorator and then finding their relevant IfcAlignmentSegment by iterating over the context in the impl function creates exponential behaviour. We have something for this called full_stack_rull which not only gives you the instance but a path through the values in all given steps. Implementation of that was broken though.. it assumed that the depth in context.instances increased with 1 every step, rather we need to look at the depth of context.instances (or the stackframe we're inspecting actually) that we have for the frame and then apply as many indexes to that from the numeric path based on that depth. Adding @civilx64 as a reviewer due to this rule.

@aothms aothms requested a review from Ghesselink January 31, 2025 12:02
@aothms aothms changed the title IVS307 CTX000 performance IVS307 performance Jan 31, 2025
@civilx64 civilx64 changed the title IVS307 performance IVS-307 performance Feb 2, 2025
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