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

Optimize getting common base class for types in an array #13079

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

aparajit-pratap
Copy link
Contributor

@aparajit-pratap aparajit-pratap commented Jul 1, 2022

Purpose

ArrayUtils.GetTypeStatisticsForArray used to unnecessarily be called twice in a few callers, once outside and once inside the call to GetCommonSubClassForArray. This PR refactors the code so that the type stats from GetTypeStatisticsForArray can be passed into the method that returns the common base type if the type stats are already computed.

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

Release Notes

Performance optimization in determining types in arrays.

Copy link
Contributor

@sm6srw sm6srw left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@mjkkirschner mjkkirschner left a comment

Choose a reason for hiding this comment

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

It looks good, but perhpas something is up with the test job not setting github checks correctly - has this passed yet?

@aparajit-pratap aparajit-pratap merged commit 050a4ba into DynamoDS:master Jul 1, 2022
@aparajit-pratap aparajit-pratap deleted the getCommonBaseType branch July 1, 2022 19:59
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.

4 participants