Skip to content
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

Issue with DN to EU function evaluations requiring multiple input fields #198

Closed
MJJoyce opened this issue Mar 9, 2021 · 0 comments · Fixed by #199
Closed

Issue with DN to EU function evaluations requiring multiple input fields #198

MJJoyce opened this issue Mar 9, 2021 · 0 comments · Fixed by #199

Comments

@MJJoyce
Copy link
Member

MJJoyce commented Mar 9, 2021

A user ran into an issue where a displayed DN to EU value appeared to not be updating as expect in the UI. At first glance this looks to be an issue with the way we're determining if we need to calculate a fields DNtoEU / human-readable value.

Assume we have two fields, F1 and F2 and two functions that are used in DN to EU conversions, main_func and sub_func. F1 has a DNtoEU equation defined as:

main_func(sub_func(raw.F1) / sub_func(raw.F2)

User noticed that F1's DNtoEU'ed value doesn't update if they take action that changes the raw value of F2. It does update as expected when they update F1s raw value.

I'm fairly sure this is an issue of the way we "cache" field values. Namely, we don't evaluate a Field's DN to EU if its raw value hasn't changed since the last time we sent an update on the field. Unfortunately, I'm not sure there's a nice way to avoid running the DN to EUs outside of always evaluating them.

MJJoyce added a commit that referenced this issue Mar 9, 2021
Update the packet diffing code so a fields raw / DNtoEU value is
always included in the diff if a DNtoEU is defined for that field.
This ensures that fields with "complex" DNtoEU functions which take
multiple input values or rely on other means to determine a value will
always be updated. This does mean that we're performing some
"unnecessary" DNtoEU conversions but in practice I expect this to have
no noticeable impact on performance.
MJJoyce added a commit that referenced this issue Mar 10, 2021
Update the packet diffing code so a fields raw / DNtoEU value is
always included in the diff if a DNtoEU is defined for that field.
This ensures that fields with "complex" DNtoEU functions which take
multiple input values or rely on other means to determine a value will
always be updated. This does mean that we're performing some
"unnecessary" DNtoEU conversions but in practice I expect this to have
no noticeable impact on performance.

Resolve #198
MJJoyce added a commit that referenced this issue Mar 10, 2021
Issue #198 - Address stagnant DN to EU value issue
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 a pull request may close this issue.

1 participant