This repository was archived by the owner on Dec 5, 2024. It is now read-only.
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Too many popper instances make rendering slow #419
Open
Description
Reproduction demo
https://codesandbox.io/s/popperjs-issue-demo-cq40c
Steps to reproduce the problem
- Open CodeSandbox demo page, and Open In New Window
F12
-> developer tools -> React Profiler- Reload and start profiling
What is the expected behavior?
What went wrong?
Using too many poppers on the same page will cause slow rendering. The possible reason (I guess?) is that popper has made a separate render commit for each instance?
You can see there are 2000+ commits in the profiler result. (demo render 1000 tooltip components)
Is this a bug or am I using it incorrectly?
Packages versions
- Popper.js: 2.9.2
- react-popper: 2.2.5