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

Question: add new types of events #27

Open
beradrian opened this issue Mar 25, 2019 · 5 comments
Open

Question: add new types of events #27

beradrian opened this issue Mar 25, 2019 · 5 comments
Assignees
Labels

Comments

@beradrian
Copy link

Is it possible to add the passive flag by default to other events like "animationend" or "transitionend"?

@FRSgit FRSgit self-assigned this Mar 26, 2019
@FRSgit
Copy link
Collaborator

FRSgit commented Mar 26, 2019

Now we are supporting only touch-or-scroll-blocking events, because that's where the problem exists.
Can you elaborate about any gains with having animation/transition connected events set as passive?

@beradrian
Copy link
Author

Most probably the same gains - performance improvements. And I think the library can be easily modified to add new events. I can even prepare a PR for this if interested.

@FRSgit
Copy link
Collaborator

FRSgit commented Mar 28, 2019

Actually now the most important would be to create some perf which shows any performance gain using passive approach. If you can prepare that, I'll make a change to library immediately.
Is it possible for you to create such test? It might event depend on browser's built-in developer tools. Just try to make lots of animations at once, and in one case use passive event and in the other don't do it.

@beradrian
Copy link
Author

I'll investigate that.

@beradrian
Copy link
Author

beradrian commented May 19, 2019

I created a test with many elements all with transitions and many iterations. The results seems to be inconclusive. The difference is too low between passive and non-passive to say that there's a performance penalty for non-passive events for transitionend.
The number of HTML elements and iterations can be easily configured. The results are displayed in the console as INFO messages - please disable DEBUG messages.
index.zip

Is there a similar test for scroll events?

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

No branches or pull requests

2 participants