Please enable JavaScript.
Coggle requires JavaScript to display documents.
YDKJSY - ASSYNC AND PERFORMANCE - Coggle Diagram
YDKJSY - ASSYNC AND PERFORMANCE
Callbacks
Trust issues
Call to soon
Call to late
call to many times or 0 call
Fail to pass along any necessary environment/parameters to your callback
Swallow any errors/exceptions that may happen
Callback hell
Event loop
heap
objects
queue
messages
stack
frames
run to completion
concurency
Promisses
Promisse pattrerns
Promise.race([ .. ])
Promise.all([ .. ])
Promisse API
Promise.reject(..)
then(..)
Promise.resolve(..)
new Promise(..)
catch(..)
Disadvantages
Sequence Error Handling
Single Resolution
Single Value
Promise is uncancelable
Generators
yield
yield-delegation
next(..)
generators preserve a sequential, synchronous, blocking code pattern for async code
Benchmarking and Tuning
Web workers
SIMD
asm.js
Benchmarking and Tuning
TCO
Benchmark.js
jsPerf.com