Memory and performance in JavaScript, simulation events (mind mapping for reading notes)

Source: Internet
Author: User

Because event handlers can provide interactivity for modern WEB applications, many developers are indiscriminately adding a large number of handlers to the page. In JavaScript, the number of event handlers added to the page will directly affect the overall performance of the page. The causes of this problem are manifold. First, each function is an object, consumes memory, and the more objects in memory, the worse the performance. Second, you must specify the number of DOM accesses that are caused by all event handlers beforehand, delaying the interaction readiness time of the entire page. There are some ways to improve performance from the perspective of how to use the good event handlers.

Events are often triggered by user actions or by other browser features. But few people know that you can use JavaScript to trigger specific events at any point in time, and events like browser-created events.

The following is a summary of memory and performance, simulation events in JavaScript Advanced programming:

Memory and performance in JavaScript, simulation events (mind mapping for reading notes)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.