mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
performance comments
This commit is contained in:
parent
f60ee04883
commit
f2dbe1f103
@ -45,7 +45,13 @@ export default function DataGrid(props) {
|
||||
<ReferenceManager {...props} managerSize={managerSize} />
|
||||
</WidgetColumnBarItem>
|
||||
)}
|
||||
<WidgetColumnBarItem title="Cell data" name="cellData" collapsed>
|
||||
<WidgetColumnBarItem
|
||||
title="Cell data"
|
||||
name="cellData"
|
||||
// cell data must be collapsed by default, because of performance reasons
|
||||
// when not collapsed, onSelectionChanged of grid is set and RERENDER of this component is done on every selection change
|
||||
collapsed
|
||||
>
|
||||
{isFormView ? (
|
||||
<CellDataView selectedValue={formSelection} />
|
||||
) : (
|
||||
|
@ -1062,6 +1062,9 @@ export default function DataGridCore(props) {
|
||||
{_.range(firstVisibleRowScrollIndex, firstVisibleRowScrollIndex + visibleRowCountUpperBound).map(
|
||||
(rowIndex) => (
|
||||
<DataGridRow
|
||||
// this component use React.memo
|
||||
// when adding props, check, whether they are correctly memoized and row is not rerendered
|
||||
// uncomment line console.log('RENDER ROW', rowIndex); in DataGridRow.js for check
|
||||
key={rowIndex}
|
||||
grider={grider}
|
||||
rowIndex={rowIndex}
|
||||
|
Loading…
Reference in New Issue
Block a user