tooltip icon indicating copy to clipboard operation
tooltip copied to clipboard

Tooltip triggers reflow & redraw too much times at any tooltip prop update

Open olek-pastukhov opened this issue 5 years ago • 1 comments

The problem located in Content.js file at lines:

  componentDidUpdate() {
    const { trigger } = this.props;
    if (trigger) {
      trigger.forcePopupAlign();
    }
  }

On every re-render/changing props it invokes forcePopupAlign. Using tooltip inside heavy and complex application with dozen nested component leads to freezing the page. My suggestion is to implement more smarter calling of forcePopupAlign. For the most cases (except very dynamic ones) it is more than enough to move the logic out from componentDidUpdate to componentDidMount.

screen shot 2019-02-20 at 01 45 55

olek-pastukhov avatar Feb 28 '19 12:02 olek-pastukhov

I'm getting really slow performance when showing and hiding lots of tooltips (like 30 of them). But this proposed code change doesn't help.

dkent600 avatar Nov 12 '19 00:11 dkent600