Monday, November 2, 2015

Best Practice: Executions & Memory Control in JavaScript

Control the Memory & Scripts Execution speed

The less operations you do, the more processor time you save, the higher speed you have.
Each new element addition to the DOM cause reflow, which can badly affect the user experience.
Here are few points how to start doing better:
  • re-locate work-intensive scripts;
  • run scripts asynchronously;
  • let inheritance to help with memory efficiency;
  • insert DOM elements within fragments;
  • declare variables as few times as possible;
  • make efficient choices in terms of script execution;

No comments:

Post a Comment