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

Improve popper.js performance with removing debounce. #909

Closed
nickofthyme opened this issue Nov 19, 2020 · 4 comments · Fixed by #2270
Closed

Improve popper.js performance with removing debounce. #909

nickofthyme opened this issue Nov 19, 2020 · 4 comments · Fixed by #2270
Labels
enhancement New feature or request :performance Performance related issues :tooltip Related to hover tooltip

Comments

@nickofthyme
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Popper.js has a debounce on the createPopper method that may limit the performance of the tooltip with composite and other chart types. This debounce limits this method to run at most once-per-tick which may be unacceptable performance.

Describe the solution you'd like
Investigate the removal of the debounce to replace with our own debounce flag to improve performance when not needed.

See floating-ui/floating-ui#1194

@nickofthyme nickofthyme added enhancement New feature or request :tooltip Related to hover tooltip :performance Performance related issues labels Nov 19, 2020
@monfera
Copy link
Contributor

monfera commented Nov 19, 2020

Thanks @nickofthyme. The goal is, consistent, synchronous repositioning of the popper.js-positioned tooltip AND whatever else moves together with the mouse, eg. the bin highlight (grey rectangle). Right now, if I swipe from left to right, the bin highlight is "glued" to the mouse X, while the tooltip is less in sync with the mouse. So the tooltip and the bin highlight can disturbingly separate from one another, esp. if there's some lag. And it's different when sweeping from left to right and right to left. Happens on current elastic-charts too, more visible on less powerful hardware and/or more contrasty bin highlight, as the current one is not too different from the background.

So the means would be the ability to deactivate (or preferably, contitionalize with a boolean config flag) the debounce.

It might even be the case that we want to debounce, but in a more controllable way, eg. the bin highlight and the tooltip together, ie. outside popper.js

@nickofthyme
Copy link
Collaborator Author

Relates to #615

@markov00
Copy link
Member

@nickofthyme can we close this after #2309 and #2270?

@nickofthyme
Copy link
Collaborator Author

Yeah I think so, didn't even remember creating this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request :performance Performance related issues :tooltip Related to hover tooltip
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants