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

Remove jQuery.event.fix performance bottleneck #3103

Closed
dmethvin opened this issue May 3, 2016 · 0 comments
Closed

Remove jQuery.event.fix performance bottleneck #3103

dmethvin opened this issue May 3, 2016 · 0 comments
Assignees
Milestone

Comments

@dmethvin
Copy link
Member

dmethvin commented May 3, 2016

Every native event has to go through jQuery.event.fix() to copy and normalize properties that go into the jQuery.Event object passed to handlers. There is a tension between minimizing the number of items copied for performance reasons versus making more of them available directly so that users won't be forced to get them via event.originalEvent.

See further discussion in gh-2860 and gh-1746.

@dmethvin dmethvin added this to the 3.0.0 milestone May 6, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
mgol pushed a commit to mgol/jquery that referenced this issue Apr 29, 2021
Fixes jquerygh-3103
Fixes jquerygh-1746
Closes jquerygh-2860

- Removes the copy loop in jQuery.event.fix
- Avoids accessing properties such as client/offset/page/screen X/Y
  which may cause style recalc or layouts
- Simplifies adding property hooks to event object

(cherry-picked from e61fccb)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants