Skip to content

Get rid of AdjustFieldValue() - #511

Merged
SergeiPavlov merged 1 commit into
master-servicetitanfrom
AdjustFieldValue
Aug 26, 2026
Merged

Get rid of AdjustFieldValue()#511
SergeiPavlov merged 1 commit into
master-servicetitanfrom
AdjustFieldValue

Conversation

@SergeiPavlov

@SergeiPavlov SergeiPavlov commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

This virtual method has never been overridden

And it adds some overhead to every Entity field access.


Note

Low Risk
Removes an unused public virtual API; behavior is unchanged unless external subclasses overrode AdjustFieldValue, which the PR states did not happen in this repo.

Overview
Removes the AdjustFieldValue extension points from Persistent (read and write overloads) and stops calling them on every field get/set.

Field reads now pass the accessor value straight into SystemGetValue / SystemGetValueCompleted without an extra object round-trip and cast. Writes assign the incoming value directly via SetUntypedValue instead of transforming it through AdjustFieldValue first.

This is a hot-path cleanup: the hooks were never overridden in the codebase but still added work on each entity field access.

Reviewed by Cursor Bugbot for commit 2d02ad2. Bugbot is set up for automated code reviews on this repo. Configure here.

@snaumenko-st snaumenko-st left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good catch!

@SergeiPavlov
SergeiPavlov merged commit a41a88a into master-servicetitan Aug 26, 2026
64 checks passed
@SergeiPavlov
SergeiPavlov deleted the AdjustFieldValue branch August 26, 2026 22:55
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