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

Optimise the performance of the MCL background colour change procedure #8

Open
RobustoSystems opened this issue Sep 1, 2023 · 0 comments
Assignees
Labels
functional functional = user-observable behaviour

Comments

@RobustoSystems
Copy link
Owner

RobustoSystems commented Sep 1, 2023

Relevant subVI: "Refresh MCL (action).vi"

This functionality can be optimised greatly. Currently the background colour of each row is set to green or red whenever a new row is added. This is computationally expensive.

Create a MCL manager component that 'knows' whose row colour needs to be changed, and which rows can stay the same colour they were. This should improve the responsiveness of the MCL background colouring when a new error is reported and when the user pressed the 'Mark all errors as read' button.

For example, imagine a situation where the Error Manager has handled 199 errors. Suppose all 199 errors are read (pale green background colour). Suppose that a new error is reported (200th error). Suppose that this error will be displayed in the first row of the MCL (i.e. suppose that the display order is set to "Latest Errors First", which is the default). Then:

Currently: The subVI iterates through all 200 rows, and executes a property node call for each row. 198 of these calls are redundant, because the middle 198 rows should maintain a pale green background. The only two rows whose background needs changing is: row 0 (the first row), whose background needs to change from pale green to pale red (unread error); and row 199 (the 200th row) whose background needs to change from white to pale green.

Scenario 2:
Suppose that there are n errors reported (n MCL rows used). Suppose that some of the errors are read, and some are unread. Suppose that the user now changes the Display Order from "Latest Errors First" to "Oldest Errors First". The error manager should be intelligent enough to determine which rows need to have their background colour changed, and which don't.

@RobustoSystems RobustoSystems added the enhancement New feature or request label Sep 1, 2023
@RobustoSystems RobustoSystems self-assigned this Sep 1, 2023
@RobustoSystems RobustoSystems added functional functional = user-observable behaviour and removed enhancement New feature or request labels Sep 2, 2023
@RobustoSystems RobustoSystems changed the title Optimise the background colour change of MCL rows Optimise the performance of the MCL background colour change procedure Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
functional functional = user-observable behaviour
Projects
None yet
Development

No branches or pull requests

1 participant