AllenFang / AllenFang/react-bootstrap-table

Potential performance issue...

未关闭
#1,345 9 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
JavaScript
星标
2.2k
派生
761
PR 合并指标
30 天内没有已合并 PR

描述

I noticed very slow performance on one of my pages that uses react bootstrap table.

Specifically, when I type text into a field on my page, it is very slow for the text to appear. Of course reactjs does a rerender with every keypress in the field.

So I wondered if maybe with every rerender that react-bootstrao-table was rerendering.

So I ran npm install why-did-you-update and on my page at the top I put:

import {whyDidYouUpdate} from 'why-did-you-update'
whyDidYouUpdate(React)

The output in the console says that react-boostrap-table is doing alot of possibly unnecessary updates, and because it the table is complex, it slows the entire page down quite dramatically because the bootstrap table re-renders with every keypress in my input fields, even though the input fields have nothing to do with the react-bootstrap-table.

So I am wondering, is it possible that react-bootstrap-table is rerendering even when it does not get new props that require it to update?

And great work Allen - I love the table and use it for all my projects!

thanks!

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。