Skip to content
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

Performance issues when nesting DIVs subscribed to element-resize #28

Open
oodesign opened this issue May 11, 2015 · 1 comment
Open

Comments

@oodesign
Copy link

Hello!

We're facing performance "issues" while nesting several DIVs subscribed to element-resize. We tried having a container DIV with 9 inner DIVs. The main container is subscribed to element-resize (and changes its children's width dynamically), and the 9 inner DIVs are also subscribing to their element-resize, and perform other actions to their children.

It takes lots of time of javascript processing (most of it in ResetTriggers()), and the frame rate drops to 1fps, 2fps... Have you encountered the same? Or have any solution or hint for that?

Thank you!

@rjgotten
Copy link

rjgotten commented Jan 7, 2016

resetTriggers not only read/write thrashes the DOM, but because it manipulates scroll offsets on DOM elements it also triggers a paint operation on those DOM elements. When said DOM elements don't have their own isolated compositing layer, it will trigger a repaint on the entire layer.

That's just the way this library works and there's little you can do about it without completely changing how resizes are detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants