-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the perf issue in the scenario that children nodes change frequently #87
Comments
@haoliangwu Thanks for reporting this issue. The reason to call |
I believe the root cause is due to
react-perfect-scrollbar/src/scrollbar.js
Line 39 in f3bd7a8
the following is the perf screenshot of my company current project:

the business is related to real-time trading, so the children of order book component change frequently and I found this library always call
this._ps.update()
after its children changed. This will cause the whole page to recalculate style frequently and decrease the FPS.Is there a better way to solve this? IMHO, the
ps.update()
is used to sync scroll container when the size or content of scroll container change, but maybe it is a little overwhelming to trigger it in each CDU lifecycle.is it better to expose
prop
to indicate the meaning of bypassing this logic when we know our scroll container is fixed or just debounce it?The text was updated successfully, but these errors were encountered: