diTii.com Digital News Hub

Sign up with your email address to be the first to know about latest news and more.

I agree to have my personal information transfered to MailChimp (more information)


Joseph Smarr High-Performance JavaScript: Why Everything You have Been Taught is Wrong? Presentation

Joseph Smarr gave a talk at Yahoo! with a pretty provocative title: High-Performance JavaScript: Why Everything You’ve Been Taught is Wrong.

He discusses some of his findings in performance such as, the Plaxo team found that in some cases they could achieve substantial gains by attaching event handlers inline using DOM level 0 syntax (e.g. <div onclick=”someGlobalFunction();”>) rather than attaching them via DOM level 2’s favored addListener.

This is very much a micro-benchmark, and if that is the source of your performance issues, you are a lucky man 😉

In sum, Joseph argues for a four-point approach to achieving maximum performance in your web-app:

  • Be lazy: Don’t load or do things before you need to; maybe you won’t need to load or do them at all.
  • Be responsive: Make things happen quickly. If you can shave 100ms off of an interaction by responding to a mousedown event instead of a click event, do it.
  • Be pragmatic: Frontend engineering is hard enough. Don’t make it harder than it needs to be.
  • Be vigilant: Blank web pages are fast. Web pages become slow because you put stuff in them; slowness is your resonsibility. Vigilance is required to prevent slowness.

Joseph Smarr, JavaScript, Online video, Online Presentation

Source:→ ajaxian

Share This Story, Choose Your Platform!

Do NOT follow this link or you will be banned from the site!