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

Improve wrapper performance #2

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 14, 2024

List of Affected Nodes/Modules

All Revit nodes that create a wrapper element

Current Performance

Currently every single time an element wrapper is created, an unnecessary assertion is performed to ensure that this wrapper is unique. This assertion is not logged or displayed to the user and from what I can tell, does not benefit them.

Proposed Performance

The best performance optimization is to avoid doing work :) . If there is no clear benefit to do this assertion every time, I propose we remove it from the release builds and only keep it there for debug builds. The performance benefit is small at face value but would add up over time in a large graph.

Dynamo Tuneup Comparison

On a model with ~55k elements collecting all elements 10 times improves performance about 8%, from 10.5 seconds to about 9.6 seconds on average.

xZ3tA45ugV

sdMJgX2HG3

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 Alleviate wrapper Improve wrapper performance Aug 14, 2024
Copy link

@Mikhinja Mikhinja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are changing behavior by removing the validity check, it will no longer give warnings for users. But I'm fine with that, debug is slower anyway and for good reasons, like this one.

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.

2 participants