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

DYN-4230 Callsite ExecWithRISlowPath optimizations to improve Cross Product replication performance #11921

Merged
merged 13 commits into from
Apr 13, 2022

Conversation

saintentropy
Copy link
Contributor

@saintentropy saintentropy commented Aug 7, 2021

Purpose

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

This PR is follow up to some previous optimizations within the Callsite class, specifically to the ExecWithZeroRI method related to Cross Product replication. A majority of these changes reduce temporary object allocations and associated GC time. The larger the data set the larger the impact of the optimization. This task covers:

  • Removing the AreParametersHomogeneousTypes method check as we can more efficiently depend on the FunctionEndPoint count. If the count is equal to 1 then we can directly resolve the finalFunctionEndPoint and cache it. The optimization was already in place but based on the AreParametersHomogeneousTypes which appears to be extraneous.
  • Rename FunctionEndPoint list variable name to plural for clarity
  • Adjust allocation of temporary parameter arrays outside of replication loop to save allocation and GC time.
  • Use DSArray directly to access parameters vs copying items to temporary arrays.
  • Set list capacity directly vs resizing dynamically after initialization.

todo => validate test
 

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

Reviewers

FYIs

@jasonstratton @QilongTang

@saintentropy saintentropy changed the title Callsite ExecWithZeroRI optimizations to improve Cross Product replication performance Callsite ExecWithRISlowPath optimizations to improve Cross Product replication performance Aug 23, 2021
@saintentropy
Copy link
Contributor Author

In a the specific test graph method execution time dropped from 2.3s to 1.3s and temporary memory allocation dropped by 1 gig.

@saintentropy saintentropy changed the title Callsite ExecWithRISlowPath optimizations to improve Cross Product replication performance DYN-4230 Callsite ExecWithRISlowPath optimizations to improve Cross Product replication performance Oct 18, 2021
@sm6srw sm6srw self-requested a review April 5, 2022 13:58
@sm6srw
Copy link
Contributor

sm6srw commented Apr 5, 2022

@saintentropy Hey, can you merge master and make this PR current when you have a moment?

@sm6srw
Copy link
Contributor

sm6srw commented Apr 8, 2022

@saintentropy Looks good. I have not seen any regressions. I have seen execution times drop up to 50% but I have not seen huge drops in use of temporary memory. But the heap is in much better shape after this changes.

@sm6srw
Copy link
Contributor

sm6srw commented Apr 8, 2022

I will wait with approving/merging these changes until we are done with our releases.

@sm6srw
Copy link
Contributor

sm6srw commented Apr 13, 2022

Tests are passing. I will merge this now.

@sm6srw sm6srw merged commit 4f40058 into DynamoDS:master Apr 13, 2022
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.

3 participants