MAGN-9744 Studio 1.0.0.775 partially renders graphics on first try #6356
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Purpose
First of all, task name is not accurate because geometry is fully rendered after some time.
When there is a lot of geometry, Dynamo computes and renders it quite slowly. The PR adds some optimization to partly overcome the issue:
SceneItemsis constantly being called, so each time it generates new list and sorts it.In this PR
SceneItemsis computed only after changes in its source;In this PR node array geometry items are stored together as it had used to be and instead label positions are stored in a separate place, so when a node requests displaying label for its array item we know where to place the label.
Analysis
I made a competition between Dynamo without my changes and Dynamo with them. It was used
lotsofstuff.dynfrom the task.Render time for each node means time to generate geometry objects from render packages for the node.
setting properties and rendering timemeans time to render already generated geometry. Render packages for each node are coming separately and between receiving packages, Helix renders what it already has.sumtime means time passed from receiving the very first render packages to finishing render of all geometry.So, it this case we have 9 seconds of gain in time.
In this case designations are the same, code block just gives much more array items, we have 1 minute and 19 seconds of gain in time.
These time values are got from output window in Visual Studio. Also, I noted the time on my smartphone starting at pressing Run button and stopping at all geometry appears. The results are next:
By the way computing render packages for a node with many array items is time-consuming operation as well. The PR does not consider this component of the delay in rendering
Declarations
*.resxfilesReviewers
@mjkkirschner
FYIs
@jnealb @kronz @ikeough