Skip to content

Optimize MaterializationContext #380

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

Merged
merged 4 commits into from
May 1, 2025

Conversation

SergeiPavlov
Copy link
Collaborator

@SergeiPavlov SergeiPavlov commented Apr 30, 2025

Reduce number of fields

Also:

  • Convert ItemMaterializationContext into readonly struct
  • Remove redundant null-check before TypeIdRegistry[typeInfo]. This indexed accessor already checks for typeInfo==null

@SergeiPavlov SergeiPavlov merged commit 8c9b837 into master-servicetitan May 1, 2025
5 checks passed
@SergeiPavlov SergeiPavlov deleted the MaterializationContext branch May 1, 2025 04:52
@snaumenko-st
Copy link

Converting classes to structs like this should be well justified, IMHO. We can't predict how it will influence performance / memory consumption, etc. without benchmarks.

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.

3 participants