@bx80 opened this Pull Request on November 30th 2021 Contributor

Description:

refs #18394

Removes the obsolete handleColumnHighlighting() method which causes a significant performance hit when rendering a datatable with many rows.

Column width and row highlighting is now handled by CSS so this method should no longer be needed.

Review

@bx80 commented on December 1st 2021 Contributor

The 'give all values consistent width' part of handleColumnHighlighting() is the real performance hit, adding mouse event handlers to add/remove classes doesn't really impact loading speed. So I've restored the method and tested again with just the width setting code disabled and performance is basically the same as with the handleColumnHighlighting() method disabled.
image
This means the ratio values will work and any other code that relies on the column highlight class being set.

@bx80 commented on December 1st 2021 Contributor

@sgiehl Following the theme of naively deleting random datatable functions... :wink:

I think the performance heavy setFixWidthToMakeEllipsisWork() method can be replaced with a small CSS tweak. Setting the table cell width to calc(80%) should allow the ellipsis to be applied to the table label column using pure CSS without needing javascript to calculate and set a fixed cell width both initially and every time the table is resized.

I've committed this change for review and it seems to work well in the tests I've done. Can you think of any problems with this approach or anything I should specifically test?

@bx80 commented on December 6th 2021 Contributor

I've updated all the screenshots for UI tests that failed from this change.

This Pull Request was closed on December 6th 2021
Powered by GitHub Issue Mirror