-
Notifications
You must be signed in to change notification settings - Fork 7
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
Sorting the command history table causes Open MCT to freeze #384
Comments
After fiddling with trying to recreate this, here's a couple of observations
|
FWIW, there's a memory leak. Here's the memlab report of a scenario where i click the the "Time" header 300 times in a fixed time setting with 18 days of sine wave generator data whose data rate is 0.0001 Hz: $ memlab run --scenario scenario.js
page-load[101.8MB](baseline)[s1] > action-on-page[102.5MB](target)[s2] > revert[102MB](final)[s3]
total time: 12min
Memory usage across all steps:
117.9 ____________
103.3 ____________
88.7 _ _ _
74.0 _ _ _
59.4 _ _ _
44.8 _ _ _
30.2 _ _ _
15.6 _ _ _
1.0 _ _ _
1 2 3
MemLab found 1 leak(s)
--Similar leaks in this run: 1158--
--Retained size of leaked objects: 95.5KB--
[<synthetic>] (synthetic) @1 [103.3MB]
--2 (shortcut)---> [Window / http://localhost:8080] (object) @6199 [33.1KB]
--__VUE_INSTANCE_SETTERS__ (property)---> [Array] (object) @181935 [164 bytes]
--0 (element)---> [<closure>] (closure) @182811 [72 bytes]
--context (internal)---> [<function scope>] (object) @179463 [235.2KB]
--reactiveMap (variable)---> [WeakMap] (object) @182307 [32.8KB]
--table (internal)---> [<array>] (array) @1972831 [32.7KB]
--4282 / part of key (Object @850793) -> value (system / JSProxy @1425967) pair in WeakMap (table @1972831) (internal)---> [system / JSProxy] (hidden) @1425967 [16 bytes]
--1 (hidden)---> [Object] (object) @850793 [852 bytes]
--scrollable (property)---> [Detached HTMLDivElement] (native) @95067 [452 bytes]
--__vueParentComponent (property)---> [Object] (object) @546897 [78.1KB]
--subTree (property)---> [Object] (object) @1878371 [73.1KB]
--dynamicChildren (property)---> [Array] (object) @1922375 [196 bytes]
--10 (element)---> [Object] (object) @1922403 [1.6KB]
--children (property)---> [Array] (object) @1922169 [424 bytes]
--35 (element)---> [Object] (object) @1801815 [1.2KB]
--el (property)---> [Detached HTMLTableRowElement] (native) @90965 [19.1KB]
--7 (element)---> [Detached Text] (native) @90967 [108 bytes]
--4 (element)---> [Detached HTMLTableCellElement] (native) @90971 [2.2KB]
--11 (element)---> [Detached HTMLTableCellElement] (native) @90981 [2.2KB]
--7 (element)---> [Detached Text] (native) @93386 [80 bytes] though pretty small. I'll keep digging. |
Tried this morning automating some sorting of the Commands table, and even after 3000 clicks, I didn't see any slow down. However, if the system is really bogged down (e.g., lots of plots), the sort on a telemetry table with a lot of columns (like the Commands table) can cause the CPU to spike more: Screen.Recording.2023-10-19.at.12.00.43.PM.movas each column is getting rerendered by Vue. I wonder if |
if we fall through the else here: if (this.firstRowInSortOrder(lastIncomingRow, firstExistingRow) === lastIncomingRow) {
this.insertOrUpdateRows(sortedRows, true);
} else if (this.firstRowInSortOrder(lastExistingRow, firstIncomingRow) === lastExistingRow) {
this.insertOrUpdateRows(sortedRows, false);
} else {
this.mergeSortedRows(sortedRows);
} namely, we’re in the middle of the row and hence we hit mergeSortedRows(rows) {
const mergedRows = [];
let i = 0;
let j = 0;
while (i < this.rows.length && j < rows.length) {
const existingRow = this.rows[i];
const incomingRow = rows[j];
const index = this.getInPlaceUpdateIndex(incomingRow);
if (index > -1) {
this.updateRowInPlace(incomingRow, index);
} else {
if (this.firstRowInSortOrder(existingRow, incomingRow) === existingRow) {
mergedRows.push(existingRow);
i++;
} else {
mergedRows.push(incomingRow);
j++;
}
}
} has some bad logic here as if if (index > -1) {
this.updateRowInPlace(incomingRow, index);
i++;
j++;
} |
Verified Fixed -- Testathon 10/26/23 |
Verified fixed Testathon 2023-10-23. |
Summary
Sorting the command history table causes Open MCT.
Impact Check List
Causes the entire tab that the command history table is in to be unusable, and Chrome to be unresponsive.
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: