paint-brush
Review of “High Performance JavaScript”by@peterchang_82818
1,778 reads
1,778 reads

Review of “High Performance JavaScript”

by July 28th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This is a note about Javascript Performance, by reading the amazing book <a href="http://shop.oreilly.com/product/9780596802806.do" target="_blank"><em>High Performance JavaScript</em></a> by <a href="https://medium.com/@slicknet" data-anchor-type="2" data-user-id="77c787f473e5" data-action-value="77c787f473e5" data-action="show-user-card" data-action-type="hover" target="_blank">Nicholas C. Zakas</a>, which helps developers to identify problem and providing better solution, to improve execution time, downloading, interaction with the DOM, page life cycle, and more.

Company Mentioned

Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Review of “High Performance JavaScript”
 HackerNoon profile picture

This is a note about Javascript Performance, by reading the amazing book High Performance JavaScript by Nicholas C. Zakas, which helps developers to identify problem and providing better solution, to improve execution time, downloading, interaction with the DOM, page life cycle, and more.

Data Access

Concepts such as the scope chain and prototype chain can affect your overall script performance.

DOM Scripting

DOM interaction is slower than other parts of JavaScript, how repaint and reflow can slow down your code.

Algorithms and Flow Control

Loops and recursion can work against you when it comes to runtime performance.

Strings and Regular Expressions

Poor string-handling performance in browsers, work around methods is explained

Responsive Interfaces

User experience, several techniques is discussed to ensure that the user interface remains responsive at all times.

Ajax

Different data formats can affect Ajax performance and why XMLHttpRequest isn’t always the best choice.

Remark

Evolution of JS

  • JavaScript was first introduced as part of Netscape Navigator in 1996
  • Google introduced their brand-new browser called Chrome in 2008.
  • The V8 JavaScript engine is a just-in-time (JIT), which produces machine code from JavaScript code and then executes it.

Things affect JS

  • Delays caused by network latency and operations, affecting the appearance on browser
  • Simple optimizations such as function inlining, code folding, and string concatenation algorithms are easily optimized in compilers, it solves only part of the performance problem.

Original goal of JS

  • JS is originally designed for form validation
  • JS is originally designed for functionality directly in the page

Reference

http://shop.oreilly.com/product/9780596802806.do