Skip to content

TypeHelper class code formatting and performance improvements#19

Merged
alex-kulakov merged 3 commits intoDataObjects-NET:masterfrom
servicetitan:type-helper
Apr 16, 2020
Merged

TypeHelper class code formatting and performance improvements#19
alex-kulakov merged 3 commits intoDataObjects-NET:masterfrom
servicetitan:type-helper

Conversation

@AlexUstinov
Copy link
Copy Markdown
Contributor

  • Lot of code formatting changes;
  • TypeHelper.Activate method now uses constructor it found rather than always falling back to Activator.CreateInstance method;
  • StringComparison.Ordinal or char arguments are now used while processing strings;
  • Performance improvement of IsNullable by removing redundant checks;
  • Performance improvements of IsAnonimous and IsClosure methods by faster string comparison also by using Type.IsDefined rather than Attribute.IsDefined (the faster way to call the same check) and by reordering operations in criteria to put faster operations first;
  • Using stored type references rather than typeof operators to eliminate expensive system calls

alex-kulakov
alex-kulakov previously approved these changes Apr 7, 2020
@alex-kulakov
Copy link
Copy Markdown
Contributor

Hello, thank you for the contribution. Seems to be OK

…e etc methods in TypeHelper class

# Conflicts:
#	Orm/Xtensive.Orm/Orm/Linq/QueryHelper.cs
Copy link
Copy Markdown
Contributor

@alex-kulakov alex-kulakov left a comment

Choose a reason for hiding this comment

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

New changes are also OK.

@alex-kulakov alex-kulakov merged commit b4d0472 into DataObjects-NET:master Apr 16, 2020
@AlexUstinov AlexUstinov deleted the type-helper branch April 16, 2020 21:07
AlexUstinov added a commit that referenced this pull request Sep 14, 2020
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