Skip to content

Conversation

@mjkkirschner
Copy link
Member

@mjkkirschner mjkkirschner commented Apr 17, 2025

Purpose

based on changes in:
#15834

simplifies these changes but retains 20 -25% performance improvement for headless graph load time. Note that this % does not improve load time of graphs in Dynamo UI significantly, but it will be valuable for headless use cases.

  1. cache category name - it does not look like ZT categories change since they use either the class name or the compiled attribute. So these seem safe to cache.
  2. Instead of building a cache of loaded assemblies - just use Assembly.Load which internally caches if an assembly is already loaded - confirmed this is the case here:
    https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/appdomain.cpp#L2554

I verified the 20% number using the mars v3 graph. (~700 nodes)

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

improve graph open time in headless contexts.

@mjkkirschner mjkkirschner changed the title Mjk/funccat DYN-8310 - speed up graph open by caching category getter Apr 17, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-8310

@mjkkirschner
Copy link
Member Author

@aparajit-pratap
Copy link
Contributor

Note that this % does not improve load time of graphs in Dynamo UI significantly, but it will be valuable for headless use cases.

Curious why this doesn't have much performance impact in Dynamo UI?

@zeusongit
Copy link
Contributor

It would be great if you could drop that graph in https://git.autodesk.com/Dynamo/DynamoTestGraphs

@mjkkirschner
Copy link
Member Author

mjkkirschner commented Apr 18, 2025

Note that this % does not improve load time of graphs in Dynamo UI significantly, but it will be valuable for headless use cases.

Curious why this doesn't have much performance impact in Dynamo UI?

I should have been more clear with numbers.

The mars graph v3 loads on my machine with no changes in ~1000ms (headless)
it loads with category caching in ~900 ms (headless)
it loads with category caching and assembly.Load changes in ~800ms (headless)

The mars graph v3 loads with UI in 30000ms - so the small number of ms saved here just make no discernable difference - the time is dominated by UI rendering/xaml loading etc.

@mjkkirschner mjkkirschner merged commit de327ba into DynamoDS:master Apr 21, 2025
23 of 24 checks passed
@mjkkirschner mjkkirschner deleted the mjk/funccat branch April 21, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants