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

Dead-End: Improve Family Instance Creation #3

Open
wants to merge 2 commits into
base: reope/performance-base
Choose a base branch
from

Conversation

dimven-adsk
Copy link
Owner

@dimven-adsk dimven-adsk commented Aug 16, 2024

Using the batch methods did not yield better performance in Revit 2025. My guess is that at some point in the recent releases the instance generation performance was greatly increased and the batch methods are no longer wielding any practical benefits. Furthermore, this makes using the family instances as inputs down the chain of nodes impossible or very impractical.

superseded details

List of Affected Nodes/Modules

FamilyInstance.ByPoint
FamilyInstance.ByPointAndLevel
FamilyInstance.ByCoordinates
FamilyInstance.ByCoordinateSystem
FamilyInstance.ByFace
FamilyInstance.ByFace2
FamilyInstance.ByHostAndPoint

Current Performance

Revit provides batch family instance creation methods. However using them directly would require the introduction of new nodes or changing the existing nodes' method signature.

Proposed Performance

We can collect all of the family instance creations and schedule them to run in a single batch call at the end of the transaction.

Dynamo Tuneup Comparison

We have CPU time and then we have Revit time. TuneUp and profiling in VS can't show the whole picture, because it doesn't capture the Revit regeneration time. Creating 30k instances and returning control to the user takes a lot longer than what is reported.

Checklist

  • There are no public function signature changes
  • Any public code that is no longer in use is tagged as obsolete and preserved.
  • The code changes have been documented
  • The overall behavior does not change

@dimven-adsk dimven-adsk changed the title WIP: Improve Family Instance Creation Dead-End: Improve Family Instance Creation Aug 21, 2024
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