Skip to content

Conversation

@saintentropy
Copy link
Contributor

Purpose

https://jira.autodesk.com/browse/DYN-9676

This PR optimizes the IsAssignableFromDictionary logic as it is on the hot path for execution. The call can be invoked repeatedly in Graph execution. This PR removes the use of LINQ to improve the throughput and memory usage.

For a graph with significant data this PR reduces the call time for this method by 75%

master:
image
PR:
image

Declarations

Check these if you believe they are true

Release Notes

VM Performance Improvements

Reviewers

FYIs

Copilot AI review requested due to automatic review settings October 14, 2025 03:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR optimizes the IsAssignableFromDictionary method to improve VM performance by replacing LINQ operations with direct loops and adding early return optimizations. The changes are part of a performance improvement initiative that reduces method execution time by 75% for graphs with significant data.

Key changes:

  • Replaces LINQ-based interface checking with direct array iteration
  • Adds fast-path checks for common dictionary types
  • Includes a minor optimization for StackValue casting

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-9676

@zeusongit zeusongit requested a review from a team October 14, 2025 16:17
@zeusongit
Copy link
Contributor

@zeusongit
Copy link
Contributor

@zeusongit zeusongit merged commit 3d2fad8 into DynamoDS:master Oct 14, 2025
24 of 28 checks passed
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