Improve performance for the experiments table webview #4991
Labels
A: experiments
Area: experiments table webview and everything related
performance
priority-p1
Regular product backlog
Removing functionalities until used
As learned from improving the plots webview performance, we do not need to set up every functionality all the time. We can anticipate its use and set it up when needed. For the experiments webview, these are the functionalities we can remove until needed to increase performance.
Contextual Menus
Even if they aren't always shown because they are inside of a tooltip, a
RowContextMenu
is created and re-rendered for each row. Since it also has complex props and state, removing the content of the contextual menus until needed can potentially save a lot of re-rendering time if there are a lot of rows.Drag and Drop
Like the plots webview, the drag-and-drop functionality is always on. We pass down the following props multiple levels as well:
onDragEnter
,onDragEnd
,onDragStart
,onDrop
,onDragLeave
. Functions are complex objects and hard to optimize as props to avoid re-rendering. Creating two paths (one with drag-and-drop functionality and one without) can help mitigate this issue.Other improvements to performance
Limit props drilling
Most of the time the table components are used by only one other component and do not need to be passed some props to distinguish it from being used elsewhere. Instead of drilling down the props, they can usually live in the lower component itself. If they cannot be moved, we can make use of Redux to get those props and dispatch events.
TableHeaderCell
component with drag-and-drop events only onmouseDown
The text was updated successfully, but these errors were encountered: