Optimize the getMentionsFromEntity() method

Created on 4 July 2024, 7 months ago

Problem/Motivation

Hi, the getMentionsFromEntity() method iterates through all fields and retrieves their values on each update or insertion of the entity. This significantly impacts performance, especially if the entity has many computed fields, the fields perform expensive calculations, there's a massive update of entities, or all these factors are present simultaneously.

Steps to reproduce

Save the entity and with the help of debugging you will see that all computed fields are computed.

Proposed resolution

I suggest getting values ​​only for fields whose item inherits the TextItemBase class. This will eliminate the computing of all unnecessary fields. This will also prevent triggering on fields that may also have a valid format property, but have a completely different purpose.

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024