ant-design Bad performance when rendering Tooltips

eni9jsuy  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(40)

Steps to reproduce

  • Record performance using the react profiler
  • Check the performance of the tooltip
  • Some tooltips, atleast on my system (M2 mac) take more than 5ms to render. Most of them are fine (less than 0.1ms)

What is expected?

Rendering should not take this long.

What is actually happening?

Some rerenders of indivitual tooltips take up to 5ms on M2 Macs, making the total render time over 100ms for 250 tooltips.
| Environment | Info |
| ------------ | ------------ |
| antd | 5.16.2 |
| React | 16.14.0 |
| System | OSX |
| Browser | Firefox |

On my local project the tooltip rerenders even when parent component this is used in is memod and not rerender but I could not reproduce this here.

Also, there already is a ticket for tooltips but that is combined with dropdowns.

相关问题