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

Destroy causes expensive forced Recalculate Layout event #373

Open
fabianeichinger opened this issue Oct 2, 2023 · 0 comments · May be fixed by #374
Open

Destroy causes expensive forced Recalculate Layout event #373

fabianeichinger opened this issue Oct 2, 2023 · 0 comments · May be fixed by #374

Comments

@fabianeichinger
Copy link

I noticed in a project using this library, that calling destroy() on a KeenSlider instance very often forces a task-blocking Recalculate Layout event, causing jank with complicated layouts. When destroying more than one slider in the same microtask, this can happen for each one multiplying the performance hit.

Profiling points to applyAttributes(remove) calling dir(element) in a ternary operator as the cause. The result of dir doesn't matter in this case as remove is true when destroying, so it seems avoidable by flipping the &&.

@fabianeichinger fabianeichinger linked a pull request Oct 2, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant