nasa / openmct

A web based mission control framework.
https://nasa.github.io/openmct/
Other
12.04k stars 1.25k forks source link

Vue makes telemetry collections reactive in Telemetry Tables #5037

Closed akhenry closed 2 years ago

akhenry commented 2 years ago

Summary

In our telemetry tables Vue is making telemetry collections reactive which comes with a pretty heavy performance penalty. Some investigation is required to understand exactly why this is happening.

Expected vs Current Behavior

The expected behavior is that any collections of telemetry (including the tableRows and telemetryCollections) should remain non-reactive after Vue has mounted the telemetry table component. Ideally the entire TelemetryTable object, and all of its direct properties should remain non-reactive.

Pausing while the Telemetry Table component is running and inspecting the TelemetryTable object currently reveals that all of the properties have been replaced with reactive getters and setters:

Screen Shot 2022-04-05 at 6 18 41 PM

If non-reactive, it would look like so: Screen Shot 2022-04-05 at 6 24 24 PM

Impact Check List

Additional Information

Vue is getting a reference to the TelemetryTable object via the TelemetryTable view, which itself is being made reactive by the ActionsCollection in Layout.vue which holds a reference to the view that the actions apply to. This means that all view objects are being reactified, so we need to be careful not to hold any references from them to objects that we do not want to become reactive.

akhenry commented 2 years ago

Testing Notes

This is a non-functional change, but it may introduce regressions in existing table functionality.

michaelrogers commented 2 years ago

There do no appear to be any regressions related to the telemetry table changes and so the fix is verified in testathon 04/25/2022.