SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
24.
Real-time Sni ng + Postprocessing
WebFrame::startLoadingResource WebCoreResourceLoader::AddData(...)
waiting data transfer
WebCoreResourceLoader::Finished()
41.
Keyword vs Identifier
instanceof instanceComponent
requires
checking
9 chars
a g h j klmopqxyz
42.
Function Parsing
Analyze the syntax
foobar = function(x, y, z)
Mark the position of
{ function ‘foobar’
....
}
foobar(x, y, z);
Compile and run the
function ‘foobar’
46.
Deploy-time Pruning
Never used
function createList(position, options) {
... some code ...
}
createList({ x: 0, y: 0});
createList({ x: 0, y: 100});
47.
Avoid Object Construction
Create + Destroy
startTime = new Date(); startTime = Date.now();
// heavy processing // heavy processing
elapsed = (new Date()) - startTime; elapsed = Date.now() - startTime;
48.
Irrelevant Platforms
Does not apply in Mobile
if (typeof object.attachEvent !== 'undefined') {
// Internet Explorer < 9
object.attachEvent('on'+ev, createWrapper(func));
} else {
// DOM Level 3
object.addEventListener(ev, func);
}