This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes delegated event performance based on container element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "delegated event performance based on container element" Watch "delegated event performance based on container element" New topic
Author

delegated event performance based on container element

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302
    
    6

When using delegated events and the on() function, is there any significant performance loss if the container element is something like the body element? I usually try and find the closest parent that I know will be on the page. My assumption is that the less jQuery has to navigate from container to handler, the better. But I really don't know that for sure.


GenRocket - Experts at Building Test Data
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15385
    
    6
You are talking milliseconds of difference. If you need high performance in a game, closer is better. For a form, does not make a difference.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302
    
    6

Thanks, Eric.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: delegated event performance based on container element
 
It's not a secret anymore!