-
Notifications
You must be signed in to change notification settings - Fork 115
Save&Restore comparison of array data #3669
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
Conversation
|
Maybe there should be a hard max (or configurable) max to what is comparable, or load up to the max. Otherwise someone could compare 700 000 elements perhaps... |
|
@jacomago, interesting, but for what reason? Usability? RAM usage? And what value should be considered a sensible default? |
| * @author Kunal Shroff | ||
| */ | ||
| public class VDeltaCellEditor<T> extends VTypeCellEditor<T> { | ||
| public class VDeltaCellEditor<S, T> extends VTypeCellEditor<S, T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the type parameter S added to VTypeCellEditor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to be able to use VTypeCellEditor for both TableEntry and ColumnEntry
Usability, otherwise yes you'll max out the ram. I think a human can't really check more than 1000 elements, but it makes sense to be configurable in some way. But extending the idea. What about you have some summary information:
|
|
@jacomago, in the main snapshot view there is a checkbox for the purpose of hiding rows where values are equal within threshold, so this could be a useful feature for array elements as well. However, this may not be feasible in the generic case when the table is showing NTTable data. Deltas could be on different row indices, so visualization becomes a challenge. That said I do not object to a "hide equal items" feature as long as the underlying PV is an array and not a table. As for limiting the number of elements... I would maybe consider a pagination approach based on a user defined limit of number of rows per page. |
|
hmm...I think comparisons of arrays are not easy and element by element comparisons can get messy very quickly I am fine with merging this as is |
|
@jacomago, updated such that row where any of the values (base or live) is not available (i.e. array length not equal), sorting on the delta column will order such rows next to rows with non-zero delta. This way user can easily find differences in array length without having to scroll to bottom of the table view. |
Looks better, I would still do the summary info. Number of rows different, number of rows matching. Its a tricky feature for UX wise obviously. |
|
Yes, why not. And maybe also length of arrays being compared... |
|
@jacomago, this is how it turns out:
When user sets a non-zero threshold the non-equal count is updated for rows where delta < threshold. |
Super nice 🙂 |

A per user request:
Comparisons in the save&restore snapshot view are difficult for arrays with more than a dozen or so elements. This PR adds the possibility to launch a dialog showing saved, delta and live value in a table view, see screenshots. A threshold spinner like the one in the snapshot view can be used to remove highlight of deltas smaller than the user defined level.
The dialog controller will connect to the PV in order to show actual live value.
Differences in array length are treated such that elements missing from either array are simply rendered as "---", see screen shots.
This PR is a first iteration, the idea is to expand this to also support NTTable types.
NOTE "Click to compare" is used only for non-scalar types.
Checklist
Testing:
Documentation: