-
Couldn't load subscription status.
- Fork 156
Closed
Labels
🐛 bugAny issue that describes a bugAny issue that describes a bug🧨 severity: medium✅ status: resolvedApplies to issues that have pending PRs resolving them, or PRs that have already merged.Applies to issues that have pending PRs resolving them, or PRs that have already merged.grid: generalversion: 7.3.9
Description
Description
Reflow occurs once per row render, rather than once per grid render. Since a grid tends to have many rows, reflow per row is impacting performance significantly.
There's various ways this could be achieved.
- Considering that the horizontal scroll position is a property of the viewport of a grid, rather than an individual row. The scroll position should be externalized and provided to all rows, rather than each row individually querying the horizontal scroll position.
- A momoized function, that is module (webpack module) scoped, could be used for obtaining the horizontal scroll position when rendering a row.
Related is #5078 which resolved the issue of reflow being caused multiple times when a single row is rendered.
- igniteui-angular version: 7.3.9
- browser: Chrome 75
Steps to reproduce
- Create a new Angular app with igniteui-angular@7.3.9 as a dependency.
- Add a basic grid
- Use Chrome to performance profile the initial grid render.
- Notice the purple blocks on Chrome Dev Tools Performance Tabs's flame chart.
Result
You can observe how reflow gets worse per row rendered, because the DOM node count and event handler count is increasing for each rendered row.
By the time the 12th row is rendered reflow is more costly than the DOM insertions for the row.
Expected result
No reflow per row rendered. At most reflow should occur once per grid render.
variable-content, Lightw3ight, kdinev and alfonsobravi
Metadata
Metadata
Assignees
Labels
🐛 bugAny issue that describes a bugAny issue that describes a bug🧨 severity: medium✅ status: resolvedApplies to issues that have pending PRs resolving them, or PRs that have already merged.Applies to issues that have pending PRs resolving them, or PRs that have already merged.grid: generalversion: 7.3.9