You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During mapping we call getters multiple times. For different situations I see different amount of getter calls (2-5 calls for a single field).
I case our getter has slow computation (for example, database calls, or generally complex logic) it may cause additional delays which could be omitted if we would call a getter only once.
Other possible problem which could be is unnecessary or unpredicted computation (for example, if we change something between each call of the getter method).
To mitigate this issue I would propose minimize getter calls (ideally we should call a getter only once, if it is needed).
A possible solution, could be making a variables for each mapping field of source object and destination object (optionally). After that we could use created variables instead of calling getters to retrieve the value.
The text was updated successfully, but these errors were encountered:
porunov
added a commit
to porunov/orika
that referenced
this issue
Apr 24, 2020
During mapping we call getters multiple times. For different situations I see different amount of getter calls (2-5 calls for a single field).
I case our getter has slow computation (for example, database calls, or generally complex logic) it may cause additional delays which could be omitted if we would call a getter only once.
Other possible problem which could be is unnecessary or unpredicted computation (for example, if we change something between each call of the getter method).
To mitigate this issue I would propose minimize getter calls (ideally we should call a getter only once, if it is needed).
A possible solution, could be making a variables for each mapping field of
source
object anddestination
object (optionally). After that we could use created variables instead of calling getters to retrieve the value.The text was updated successfully, but these errors were encountered: