Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Optimize DatatipManager._hideOrCancel #94

Closed
hansonw opened this issue Oct 18, 2017 · 0 comments
Closed

Optimize DatatipManager._hideOrCancel #94

hansonw opened this issue Oct 18, 2017 · 0 comments
Assignees

Comments

@hansonw
Copy link
Contributor

hansonw commented Oct 18, 2017

This gets called very frequently, but this tries to obtain the buffer position for the last mouse event every time (even when the datatip is already hidden!) which forces a re-render of the editor!

We should definitely make this faster and probably audit for other cases where we force rerendering in hot codepaths. (Maybe Hyperclick too?)

@hansonw hansonw self-assigned this Oct 18, 2017
facebook-github-bot pushed a commit to facebookarchive/nuclide that referenced this issue Oct 19, 2017
Summary:
1) On Windows, modifier keys are also subject to key repeat. So we shouldn't try to repeatedly fetch modifier datatips (facebookarchive/atom-ide-ui#20)
2) We try to blacklist the current mouse position in certain scenarios. However, since moving the mouse clears the blacklist, it's only safe to set this once. `getBufferPosition` forces a layout recalculation so it's expensive! (facebookarchive/atom-ide-ui#94)
Closes #1347

Reviewed By: wbinnssmith

Differential Revision: D6097902

Pulled By: hansonw

fbshipit-source-id: c1bd27900a0604d7654abfc0aa15baabf740cf77
hansonw added a commit that referenced this issue Oct 19, 2017
Summary:
1) On Windows, modifier keys are also subject to key repeat. So we shouldn't try to repeatedly fetch modifier datatips (#20)
2) We try to blacklist the current mouse position in certain scenarios. However, since moving the mouse clears the blacklist, it's only safe to set this once. `getBufferPosition` forces a layout recalculation so it's expensive! (#94)
Closes facebookarchive/nuclide#1347

Reviewed By: wbinnssmith

Differential Revision: D6097902

Pulled By: hansonw

fbshipit-source-id: c1bd27900a0604d7654abfc0aa15baabf740cf77
@hansonw hansonw closed this as completed Oct 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant