SlideShare a Scribd company logo
High Performance JavaScriptNicholas C. Zakas| CapitolJS | September 18, 2011
Who's this guy?Co-Creator csslint.netContributor,Creator of YUI TestEx-tech leadYahoo!AuthorLead AuthorContributorLead Author
@slicknet(complaints: @voodootikigod)
Does JavaScript performance matter?
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
All browsers now haveoptimizing JavaScript enginesTracemonkey/JaegarMonkey(3.5+)V8(all)Nitro(4+)Chakra(9+)Karakan(10.5+)
http://ie.microsoft.com/testdrive/benchmarks/sunspider/default.html
Old computers ran slow applicationsSmall amounts of CPU power and memory
New computers are generally faster butslow applications still existMore CPU + more memory = less disciplined application development
High Performance JavaScript (CapitolJS 2011)
Oh yeah, one more thing
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
It's still possible to write slow JavaScript
JavaScript performancedirectlyaffects user experience
The UI Threadaka Browser Event Loop
The browser UI thread is responsible forboth UI updates and JavaScript executionOnly one can happen at a time
Jobs for UI updates and JavaScript executionare added to a UI queueEach job must wait in line for its turn to execute
<button id="btn" style="font-size: 30px; padding: 0.5em 1em">Click Me</button><script type="text/javascript">window.onload = function(){   document.getElementById("btn").onclick = function(){//do something   };};</script>
Before ClickUI ThreadtimeUI Queue
When ClickedUI ThreadtimeUI QueueUI UpdateonclickUI Update
When ClickedUI ThreadUI UpdatetimeUI QueueonclickDraw down stateUI Update
When ClickedUI ThreadonclickUI UpdatetimeUI QueueUI Update
When ClickedUI ThreadonclickUI UpdateUI UpdatetimeUI QueueDraw up state
No UI updates while JavaScript is executing
JavaScript May Cause UI Update<button id="btn" style="font-size: 30px; padding: 0.5em 1em">Click Me</button><script type="text/javascript">window.onload = function(){   document.getElementById("btn").onclick = function(){       var div = document.createElement(“div”);       div.className = “tip”;       div.innerHTML = “You clicked me!”;       document.body.appendChild(div);   };};</script>
A UI update must use the latest info available
Long-running JavaScript=Unresponsive UI
Responsive UIUI ThreadJavaScriptUI UpdateUI Updatetime
Unresponsive UIUI ThreadJavaScriptUI UpdateUI Updatetime
The longer JavaScript runs,the worse the user experience
The runaway script timer prevents JavaScriptfrom running for too longEach browser imposes its own limit (except Opera)
Internet Explorer
Firefox
Safari
Chrome
High Performance JavaScript (CapitolJS 2011)
Runaway Script Timer LimitsInternet Explorer: 5 million statementsFirefox: 10 secondsSafari: 5 secondsChrome: Unknown, hooks into normal crash control mechanismOpera: none
How Long Is Too Long?“0.1 second [100ms] is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.”- Jakob Nielsen
Translation:No single JavaScript job should execute for more than 100ms to ensure a responsive UI
Recommendation:Limit JavaScript execution to no more than 50msmeasured on IE6 :)
Loadtime TechniquesDon't let JavaScript interfere with page load performance
During page load, JavaScript takes more time on the UI thread
<!doctype html><html><head>    <title>Example</title></head><body>    <p>Hello world!</p><script src="foo.js"></script>    <p>See ya!</p></body></html>
ResultUI ThreadJavaScriptUI UpdateUI Updatetime
ResultUI Threadfoo.jsSee ya!Hello world!time
ResultUI ThreadDownloadSee ya!Hello world!ParseRuntimeThe UI thread needs to wait for the script todownload, parse, and run before continuing
ResultUI ThreadDownloadSee ya!Hello world!ParseRunVariableConstantDownload time takes the longest and is variable
Translation:The page doesn't render while JavaScript is downloading, parsing, or executing during page load
<!doctype html><html><head>    <title>Example</title></head><body><script src="foo.js"></script>    <p>Hello world!</p><script src="bar.js"></script>    <p>See ya!</p><script src="baz.js"></script>    <p>Uh oh!</p></body></html>
ResultUI ThreadJavaScriptUI UpdateUI UpdateJavaScriptJavaScripttimeThe more scripts to download in between UIupdates, the longer the page takes to render
Technique #1: Load scripts dynamically
Basic Techniquevar script = document.createElement("script"),    body;script.type = "text/javascript";script.src = "foo.js";body.insertBefore(script, body.firstChild);Dynamically loaded scripts are non-blocking
Downloads no longer block the UI thread
<!doctype html><html><head>    <title>Example</title></head><body>    <p>Hello world!</p><script src="foo.js"></script>    <p>See ya!</p></body></html>
Using HTML <script>UI ThreadDownloadSee ya!Hello world!ParseRuntime
<!doctype html><html><head>    <title>Example</title></head><body>    <p>Hello world!</p>    <script>    var script = document.createElement("script"),        body = document.body;    script.type = "text/javascript";    script.src = "foo.js";    body.insertBefore(script, body.firstChild);    </script>    <p>See ya!</p><!-- more content --></body></html>
Using Dynamic ScriptsUI ThreadSee ya!Hello world!UI UpdateRuntimeDownloadParseOnly code execution happens on the UI thread,which means less blocking of UI updates
function loadScript(url, callback){var script = document.createElement("script"),    body = document.body;script.type = "text/javascript";if (script.readyState){  //IE <= 8    script.onreadystatechange = function(){if (script.readyState == "loaded" ||                script.readyState == "complete"){            script.onreadystatechange = null;            callback();        }    };} else {  //Others    script.onload = function(){        callback();    };}script.src = url;body.insertBefore(script, body.firstChild);}
UsageloadScript("foo.js", function(){    alert("Loaded!");});
Timing Note:Script execution begins immediately after download and parse – timing of execution is not guaranteed
Technique #2: Defer scripts
<!doctype html><html><head>    <title>Example</title></head><body>    <p>Hello world!</p><script defer src="foo.js"></script>    <p>See ya!</p>    <!-- even more markup --></body></html>
Support for <script defer>?5.03.57.04.0
Deferred scripts begin to download immediately, but don't execute until all UI updates complete
Using <script defer>UI ThreadSee ya!Hello world!More UIRunMore UItimeDownloadParseSimilar to dynamic script nodes, but with aguarantee that execution will happen last
Timing Note:Although scripts always execute after UI updates complete, the order of multiple <script defer> scripts is not guaranteed across browsers
Technique #3: Asynchronous scripts
<!doctype html><html><head>    <title>Example</title></head><body>    <p>Hello world!</p><script async src="foo.js"></script>    <p>See ya!</p>    <!-- even more markup --></body></html>
Support for <script async>?5.03.67.010
Asynchronous scripts behave a lot like dynamic scripts
Using <script async>UI ThreadSee ya!Hello world!UI UpdateRuntimeDownloadParseDownload begins immediately and execution isslotted in at first available spot
Note:Order of execution is explicitly not preserved for asynchronous scripts
Runtime TechniquesWays to ensure JavaScript doesn't run away
function processArray(items, process, callback){for (var i=0,len=items.length; i < len; i++){        process(items[i]);    }    callback();}
Technique #1: Timers
//create a new timer and delay by 500mssetTimeout(function(){//code to execute here}, 500);setTimeout() schedules a function to be added to the UI queue after a delay
function timedProcessArray(items, process, callback){//create a clone of the original  var todo = items.concat();    setTimeout(function(){var start = +new Date();do {            process(todo.shift());        } while (todo.length > 0 &&             (+new Date() - start < 50));if (todo.length > 0){            setTimeout(arguments.callee, 25);        } else {            callback(items);        }    }, 25);}
When ClickedUI ThreadtimeUI QueueUI UpdateonclickUI Update
When ClickedUI ThreadUI UpdatetimeUI QueueonclickUI Update
When ClickedUI ThreadonclickUI UpdatetimeUI QueueUI Update
When ClickedUI ThreadUI UpdateUI UpdateonclicktimeUI Queue
After 25msUI ThreadUI UpdateUI UpdateonclicktimeUI QueueJavaScript
After 25msUI ThreadJavaScriptUI UpdateUI UpdateonclicktimeUI Queue
After Another 25msUI ThreadJavaScriptUI UpdateUI UpdateonclicktimeUI QueueJavaScript
After Another 25msUI ThreadJavaScriptJavaScriptUI UpdateUI UpdateonclicktimeUI Queue
Technique #2: Script YieldingNEW!
High Performance JavaScript (CapitolJS 2011)
//delay a function until after UI updates are donesetImmediate(function(){//code to execute here});setImmediate() adds code to the UI queue after pending UI updates are finished
Support for Script Yielding????10msSetIntermediate()
functionyieldingProcessArray(items, process, callback){//create a clone of the originalvartodo = items.concat();setImmediate(function(){var start = +new Date();do {            process(todo.shift());        } while (todo.length > 0 &&             (+new Date() - start < 50));if (todo.length > 0){setImmediate(arguments.callee);        } else {            callback(items);        }});}
When ClickedUI ThreadtimeUI QueueUI UpdateonclickUI Update
When ClickedUI ThreadUI UpdatetimeUI QueueonclickUI Update
When ClickedUI ThreadonclickUI UpdatetimeUI QueueUI Update
When ClickedUI ThreadUI UpdateUI UpdateonclicktimeUI Queue
After Last UI UpdateUI ThreadUI UpdateUI UpdateonclicktimeUI QueueJavaScript
After Last UI UpdateUI ThreadJavaScriptUI UpdateUI UpdateonclicktimeUI Queue
No Other UI UpdatesUI ThreadJavaScriptUI UpdateUI UpdateonclicktimeUI QueueJavaScript
No Other UI UpdatesUI ThreadJavaScriptJavaScriptUI UpdateUI UpdateonclicktimeUI Queue
Technique #3: Web Workers
High Performance JavaScript (CapitolJS 2011)
Support for Web Workers10.64.03.54.010
Web WorkersAsynchronous JavaScript executionExecution happens outside the UI threadDoesn’t block UI updatesData-Driven APIData is serialized going into and out of the workerNo access to DOM or BOMSeparate execution environment
//in pagevar worker = new Worker("process.js");worker.onmessage = function(event){    useData(event.data);};worker.postMessage(values);//in process.jsself.onmessage = function(event){var items = event.data;for (var i=0,len=items.length; i < len; i++){        process(items[i]);    }    self.postMessage(items);};
When ClickedUI ThreadtimeUI QueueUI UpdateonclickUI Update
When ClickedUI ThreadUI UpdatetimeUI QueueonclickUI Update
When ClickedUI ThreadonclickUI UpdatetimeUI QueueUI Update
When ClickedUI ThreadonclickUI UpdatetimeUI QueueWorker ThreadUI Update
When ClickedUI ThreadUI UpdateUI UpdateonclicktimeUI QueueWorker ThreadJavaScript
Worker Thread CompleteUI ThreadUI UpdateUI UpdateonclicktimeUI Queueonmessage
Worker Thread CompleteUI ThreadonmessageUI UpdateUI UpdateonclicktimeUI Queue
Recap
The browser UI thread is responsible forboth UI updates and JavaScript executionOnly one can happen at a time
Responsive UIUI ThreadJavaScriptUI UpdateUI Updatetime
Unresponsive UIUI ThreadJavaScriptUI UpdateUI Updatetime
Avoid Slow Loading JavaScriptDynamically created scriptsDeferred scriptsAsynchronous scripts
Avoid Slow JavaScriptDon't allow JavaScript to execute for more than 50msBreak up long JavaScript processes using:TimersScript Yielding (future)Web Workers
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
EtceteraMy blog: 	www.nczonline.netTwitter:		@slicknetThese Slides:	slideshare.net/nzakasHire us:		projects@stubbornella.org
Questions?
Creative Commons Images Usedhttp://www.flickr.com/photos/lrargerich/3115367361/http://www.flickr.com/photos/hippie/2406411610/http://www.flickr.com/photos/55733754@N00/3325000738/http://www.flickr.com/photos/eurleif/255241547/http://www.flickr.com/photos/off_the_wall/3444915939/http://www.flickr.com/photos/wwarby/3296379139/http://www.flickr.com/photos/derekgavey/4358797365/http://www.flickr.com/photos/mulad/286641998/http://www.flickr.com/photos/torley/2361164281/http://www.flickr.com/photos/ottoman42/455242/http://www.flickr.com/photos/goincase/3843348908/

More Related Content

PPTX
What is HTML 5?
Susan Winters
 
PDF
High Performance JavaScript - jQuery Conference SF Bay Area 2010
Nicholas Zakas
 
PDF
Learning from the Best jQuery Plugins
Marc Grabanski
 
PDF
High Performance JavaScript - WebDirections USA 2010
Nicholas Zakas
 
PDF
High Performance JavaScript (Amazon DevCon 2011)
Nicholas Zakas
 
PDF
Keypoints html5
dynamis
 
PDF
Usability in the GeoWeb
Dave Bouwman
 
PDF
How to make Ajax work for you
Simon Willison
 
What is HTML 5?
Susan Winters
 
High Performance JavaScript - jQuery Conference SF Bay Area 2010
Nicholas Zakas
 
Learning from the Best jQuery Plugins
Marc Grabanski
 
High Performance JavaScript - WebDirections USA 2010
Nicholas Zakas
 
High Performance JavaScript (Amazon DevCon 2011)
Nicholas Zakas
 
Keypoints html5
dynamis
 
Usability in the GeoWeb
Dave Bouwman
 
How to make Ajax work for you
Simon Willison
 

What's hot (20)

PDF
High Performance JavaScript 2011
Nicholas Zakas
 
PDF
Progressive Enhancement 2.0 (Conference Agnostic)
Nicholas Zakas
 
PDF
Mobile Web Speed Bumps
Nicholas Zakas
 
PPT
WordPress and Ajax
Ronald Huereca
 
PPTX
Browser Wars Episode 1: The Phantom Menace
Nicholas Zakas
 
PPTX
High Performance Snippets
Steve Souders
 
PDF
Don't make me wait! or Building High-Performance Web Applications
Stoyan Stefanov
 
PDF
Building an HTML5 Video Player
Jim Jeffers
 
PDF
Ajax Security
Joe Walker
 
PDF
Testing Mobile JavaScript
jeresig
 
PDF
JavaScript Libraries: The Big Picture
Simon Willison
 
PPT
Fav
helloppt
 
PPT
High Performance Ajax Applications
Julien Lecomte
 
PDF
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
 
PDF
jQuery Proven Performance Tips & Tricks
Addy Osmani
 
PDF
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
David Kaneda
 
PPTX
JavaScript Timers, Power Consumption, and Performance
Nicholas Zakas
 
PDF
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Matt Raible
 
PPT
AngularJS for Legacy Apps
Peter Drinnan
 
PDF
High Performance JavaScript (YUIConf 2010)
Nicholas Zakas
 
High Performance JavaScript 2011
Nicholas Zakas
 
Progressive Enhancement 2.0 (Conference Agnostic)
Nicholas Zakas
 
Mobile Web Speed Bumps
Nicholas Zakas
 
WordPress and Ajax
Ronald Huereca
 
Browser Wars Episode 1: The Phantom Menace
Nicholas Zakas
 
High Performance Snippets
Steve Souders
 
Don't make me wait! or Building High-Performance Web Applications
Stoyan Stefanov
 
Building an HTML5 Video Player
Jim Jeffers
 
Ajax Security
Joe Walker
 
Testing Mobile JavaScript
jeresig
 
JavaScript Libraries: The Big Picture
Simon Willison
 
High Performance Ajax Applications
Julien Lecomte
 
Tek 2013 - Building Web Apps from a New Angle with AngularJS
Pablo Godel
 
jQuery Proven Performance Tips & Tricks
Addy Osmani
 
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
David Kaneda
 
JavaScript Timers, Power Consumption, and Performance
Nicholas Zakas
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Matt Raible
 
AngularJS for Legacy Apps
Peter Drinnan
 
High Performance JavaScript (YUIConf 2010)
Nicholas Zakas
 
Ad

Viewers also liked (20)

PPTX
Maintainable JavaScript 2012
Nicholas Zakas
 
PPTX
JavaScript APIs you’ve never heard of (and some you have)
Nicholas Zakas
 
PDF
Writing Efficient JavaScript
Nicholas Zakas
 
PDF
High Performance JavaScript - Fronteers 2010
Nicholas Zakas
 
PPTX
Timers and pwm
Saideep Kamishetty
 
PDF
Enterprise JavaScript Error Handling (Ajax Experience 2008)
Nicholas Zakas
 
PDF
Maintainable JavaScript 2011
Nicholas Zakas
 
PPTX
Enough with the JavaScript already!
Nicholas Zakas
 
PDF
8051 Timers / Counters
Patricio Lima
 
PDF
Extreme JavaScript Compression With YUI Compressor
Nicholas Zakas
 
PDF
Excellence land rover
nirmal francis
 
DOCX
Mt on leadership and its effects on employees performance
Shashi Chandra
 
DOCX
Report..costing..
Nur Dalila Zamri
 
PDF
srthsrth
nn2141485
 
PPTX
Ghgfhgfh
sam-i-am2222
 
PDF
nullcon 2011 - Buffer UnderRun Exploits
n|u - The Open Security Community
 
PPT
Proactive Professionalism Networking Today Nj 1
Suzanne Carbonaro
 
PDF
Transactional learning and simulations: how far can we go in professional leg...
Osgoode Professional Development, Osgoode Hall Law School, York University
 
PDF
Prescrition co-owners- pdf
sahib rox
 
PDF
Good prescribing
Resti Cahyani
 
Maintainable JavaScript 2012
Nicholas Zakas
 
JavaScript APIs you’ve never heard of (and some you have)
Nicholas Zakas
 
Writing Efficient JavaScript
Nicholas Zakas
 
High Performance JavaScript - Fronteers 2010
Nicholas Zakas
 
Timers and pwm
Saideep Kamishetty
 
Enterprise JavaScript Error Handling (Ajax Experience 2008)
Nicholas Zakas
 
Maintainable JavaScript 2011
Nicholas Zakas
 
Enough with the JavaScript already!
Nicholas Zakas
 
8051 Timers / Counters
Patricio Lima
 
Extreme JavaScript Compression With YUI Compressor
Nicholas Zakas
 
Excellence land rover
nirmal francis
 
Mt on leadership and its effects on employees performance
Shashi Chandra
 
Report..costing..
Nur Dalila Zamri
 
srthsrth
nn2141485
 
Ghgfhgfh
sam-i-am2222
 
nullcon 2011 - Buffer UnderRun Exploits
n|u - The Open Security Community
 
Proactive Professionalism Networking Today Nj 1
Suzanne Carbonaro
 
Transactional learning and simulations: how far can we go in professional leg...
Osgoode Professional Development, Osgoode Hall Law School, York University
 
Prescrition co-owners- pdf
sahib rox
 
Good prescribing
Resti Cahyani
 
Ad

Similar to High Performance JavaScript (CapitolJS 2011) (20)

PPT
Responsive interfaces
Nicholas Zakas
 
PPT
Even Faster Web Sites at jQuery Conference '09
Steve Souders
 
PPT
jQuery and_drupal
BlackCatWeb
 
PPT
Ta Javaserverside Eran Toch
Adil Jafri
 
PPTX
JavaScript Performance Patterns
Stoyan Stefanov
 
PPTX
J Query Presentation
Vishal Kumar
 
ODP
Basic testing with selenium
Søren Lund
 
ODP
Implementing Comet using PHP
King Foo
 
PPT
Selenium
Adam Goucher
 
ODP
Rapid JCR Applications Development with Sling
Felix Meschberger
 
PPTX
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Todd Anglin
 
PPT
Sxsw 20090314
guestcabcf63
 
PPT
Google在Web前端方面的经验
yiditushe
 
PPT
SXSW: Even Faster Web Sites
Steve Souders
 
KEY
Developing High Performance Web Apps - CodeMash 2011
Timothy Fisher
 
PPT
Node js presentation
martincabrera
 
PPT
Wookie Meetup
scottw
 
PPT
Wookie Meetup
scottw
 
ODP
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
mguillem
 
PDF
Performance on the Yahoo! Homepage
Nicholas Zakas
 
Responsive interfaces
Nicholas Zakas
 
Even Faster Web Sites at jQuery Conference '09
Steve Souders
 
jQuery and_drupal
BlackCatWeb
 
Ta Javaserverside Eran Toch
Adil Jafri
 
JavaScript Performance Patterns
Stoyan Stefanov
 
J Query Presentation
Vishal Kumar
 
Basic testing with selenium
Søren Lund
 
Implementing Comet using PHP
King Foo
 
Selenium
Adam Goucher
 
Rapid JCR Applications Development with Sling
Felix Meschberger
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Todd Anglin
 
Sxsw 20090314
guestcabcf63
 
Google在Web前端方面的经验
yiditushe
 
SXSW: Even Faster Web Sites
Steve Souders
 
Developing High Performance Web Apps - CodeMash 2011
Timothy Fisher
 
Node js presentation
martincabrera
 
Wookie Meetup
scottw
 
Wookie Meetup
scottw
 
WebTest - Efficient Functional Web Testing with HtmlUnit and Beyond
mguillem
 
Performance on the Yahoo! Homepage
Nicholas Zakas
 

More from Nicholas Zakas (11)

PPTX
The Pointerless Web
Nicholas Zakas
 
PPTX
Scalable JavaScript Application Architecture 2012
Nicholas Zakas
 
PDF
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Nicholas Zakas
 
PDF
YUI Test The Next Generation (YUIConf 2010)
Nicholas Zakas
 
PDF
Nicholas' Performance Talk at Google
Nicholas Zakas
 
PDF
Scalable JavaScript Application Architecture
Nicholas Zakas
 
PDF
Speed Up Your JavaScript
Nicholas Zakas
 
PDF
Maintainable JavaScript
Nicholas Zakas
 
PDF
JavaScript Variable Performance
Nicholas Zakas
 
ODP
The New Yahoo! Homepage and YUI 3
Nicholas Zakas
 
PDF
Test Driven Development With YUI Test (Ajax Experience 2008)
Nicholas Zakas
 
The Pointerless Web
Nicholas Zakas
 
Scalable JavaScript Application Architecture 2012
Nicholas Zakas
 
Progressive Enhancement 2.0 (jQuery Conference SF Bay Area 2011)
Nicholas Zakas
 
YUI Test The Next Generation (YUIConf 2010)
Nicholas Zakas
 
Nicholas' Performance Talk at Google
Nicholas Zakas
 
Scalable JavaScript Application Architecture
Nicholas Zakas
 
Speed Up Your JavaScript
Nicholas Zakas
 
Maintainable JavaScript
Nicholas Zakas
 
JavaScript Variable Performance
Nicholas Zakas
 
The New Yahoo! Homepage and YUI 3
Nicholas Zakas
 
Test Driven Development With YUI Test (Ajax Experience 2008)
Nicholas Zakas
 

Recently uploaded (20)

PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
DevOps & Developer Experience Summer BBQ
AUGNYC
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
NewMind AI Monthly Chronicles - July 2025
NewMind AI
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
DOCX
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
PDF
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
georgschmitzdoerner
 
PDF
Doc9.....................................
SofiaCollazos
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PPTX
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
DevOps & Developer Experience Summer BBQ
AUGNYC
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
NewMind AI Monthly Chronicles - July 2025
NewMind AI
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
The Power of IoT Sensor Integration in Smart Infrastructure and Automation.pptx
Rejig Digital
 
CIFDAQ'S Market Insight: BTC to ETH money in motion
CIFDAQ
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
madgavkar20181017ppt McKinsey Presentation.pdf
georgschmitzdoerner
 
Doc9.....................................
SofiaCollazos
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
C Programming Basics concept krnppt.pptx
Karan Prajapat
 

High Performance JavaScript (CapitolJS 2011)

Editor's Notes

  • #2: Over the past couple of years, we&apos;ve seen JavaScript development earn recognition as a true discipline. The idea that you should architect your code, use patterns and good programming practices has really elevated the role of the front end engineer. In my opinion, part of this elevation has been the adoption of what has traditionally been considered back end methodologies. We now focus on performance and algorithms, there&apos;s unit testing for JavaScript, and so much more. One of the areas that I&apos;ve seen a much slower than adoption that I&apos;d like is in the area of error handling.How many people have an error handling strategy for their backend? How many have dashboards that display problems with uptime and performance? How many have anything similar for the front end?Typically, the front end has been this black hole of information. You may get a few customer reports here and there, but you have no information about what&apos;s going on, how often it&apos;s occurring, or how many people have been affected.
  • #122: So what have we talked about? Maintainable JavaScript is made up of four components.First is Code Conventions that describe the format of the code you’re writing.Second is Loose Coupling – keeping HTML, JavaScript, and CSS on separate layers and keeping application logic out of event handlers.Third is Programming Practices that ensure your code is readable and easily debugged.Fourth is creating a Build Process