I mean, things like changing `while (j<len)` to `while (j--)` might be 2x as fast when `process(item)` does nothing, but, its unlikely that the while condition is going to be your performance bottleneck. Unless you're doing it a few hundred thousand times
Things like using 'j--' as your loop condition to reduce evaluations or storing a deep property as a local variable to reduce look up (var name = object.name.name) may help you squeeze a little more performance out of your app, but there is something to be said for code readability. IMHO, in most cases you should not sacrifice code readability for performance, especially in a large app. Many of the performance issues discussed are problems with browser engined, not the JS apps.
just to note, documentFragment looks awesome and I was never aware of it, but it seems it still doesn't keep up in ease and speed of the old innerHTML
As my "Guru" said about this video " If you completed the prototypal inheritance, variable scope, and scope-chain traversal....then you might wanna watch it. It will make a lot of things very clear"
Great video and lots of useful informations... however google employees must have been really drinking the day before or something... the most boring audience ever -.-
I'm glad that others share my view on animation in respect to performance. This portion of the presentation on reflow optimization was very informational and useful.
@Skinnyuser not much. c++ has no concept of an arbitrary scope chain, object attribute/array lookups are static/fixed-offset-style and handled by the compiler and usually O(1), and loop optimization etc will be taken care of by a decent compiler.
the best tip i ever got for makeing fast programs was actualy useing c, c++ or c#.. and if i wanted the fastest programs ever then id have to learn assembler language :P in anycase iam still avoiding java like the plague, its still a memory hog, it runs patheticly even if you write perfect java its still not possible to avoid these issues on spesific program needs, java is only good for one thing
and whit that said java isnt good for much other stuff exept some decent or avarge minor programs.
Javascript and Java are not related in any other form than their names.
In terms of slowness, and virtualization, javascript is even much slower than java, because java at least compiles to bytecode (and can do pretty good optimizations because of it's strong typed syntax), whereas javascript is interpreted from source code (until now... =P)..
Look, don't take me wrong, I'm a C/C++ person too. But I do have respect for Java and those "tiny apps" called eclipse, OpenOffice, etc.
Well.... where to start... if you are not sure about the difference between java and javascript, I think you might be a little naive on other things as well. Nothing bad with that, but since I've been programming in some way for 20+ years, I might give you my 2 cents.
If you want most programs to run fast, write them in a high level language and spend the time by learning to use the provided libraries, and improve the architecture. Don't turn to pointers for performance. Btw my choice is Python.
This comment has received too many negative votesshow
Java programs are the slowest most resource hungry programs out there. Not to mention, Java's virtual machine tends to bog down after running for awhile on your server. Python doesn't seem have these problems.
Very pragmatic presentation, real situations with solutions which are measured and tested. Nicholas Zakas is a great speaker for me. Thank you for sharing your knowledge!
@keemor Only few tech talk or Google videos has the quality of this video. Straight to the point, and which every other talk was this easy to understand for beginners. He is good!
42:00 At first I thought it was Steve Wozniak
Blinkwing 3 weeks ago
I mean, things like changing `while (j<len)` to `while (j--)` might be 2x as fast when `process(item)` does nothing, but, its unlikely that the while condition is going to be your performance bottleneck. Unless you're doing it a few hundred thousand times
gremlack 4 weeks ago
terrific lecture. but a question: what is the funny thing about the DOM?
davidgraycn 2 months ago
Things like using 'j--' as your loop condition to reduce evaluations or storing a deep property as a local variable to reduce look up (var name = object.name.name) may help you squeeze a little more performance out of your app, but there is something to be said for code readability. IMHO, in most cases you should not sacrifice code readability for performance, especially in a large app. Many of the performance issues discussed are problems with browser engined, not the JS apps.
wesw02 2 months ago
i dont understand javascript. i would like to know how to read and write it but there are no beginner tutorials.(starting from the begining)
MrDotMontage 3 months ago
pretty programatic lecturing talk! thanks through communicating bilateral intelligence.
flowewritharoma 5 months ago
Eight members of MS IE team watched this video.
DragonForceF0REVER 8 months ago 8
just to note, documentFragment looks awesome and I was never aware of it, but it seems it still doesn't keep up in ease and speed of the old innerHTML
ssoonn88 8 months ago
All I can think about now is how much refactoring I need to do.
neocoders 9 months ago
every web developer should watch this
altu892 9 months ago
As my "Guru" said about this video " If you completed the prototypal inheritance, variable scope, and scope-chain traversal....then you might wanna watch it. It will make a lot of things very clear"
Thanks a lot "Guru"
KPSrinivasa 11 months ago
great speaker with knowhow and great video
the informations are very useful in the daily use of javascript...
TheHihoGuy 11 months ago
8 people dont understand javascript...
Rayden150 1 year ago
Comment removed
DragonForceF0REVER 8 months ago
THE DOM
locutusofworm 1 year ago
This comment has received too many negative votes show
a very long video so i couldnt be bothered watching i mean you expect me to watch 56:23 mins on a video GROW UP!!!
reeceawtait 1 year ago
The background noise is pissing me off...
eiriklil 1 year ago 2
Great talk, loved the guy
beatbua 1 year ago
Great video and lots of useful informations... however google employees must have been really drinking the day before or something... the most boring audience ever -.-
spamero2 1 year ago
Oh, that audience had no soul. I laughed at all of those.
thatmartolguy 1 year ago
I'm glad that others share my view on animation in respect to performance. This portion of the presentation on reflow optimization was very informational and useful.
jake1soccer 1 year ago
This speaker is fantastic, but it seems like his wisdom was lost on Google's employees... they didn't seem to care or react!
JamesMGreene 1 year ago
Thanks....good video
Hemo1231000 1 year ago
Will these tips work for C++ and C#? Especially copying to local variables and loop optimization?
Skinnyuser 1 year ago
@Skinnyuser not much. c++ has no concept of an arbitrary scope chain, object attribute/array lookups are static/fixed-offset-style and handled by the compiler and usually O(1), and loop optimization etc will be taken care of by a decent compiler.
hth
thereisthespoon 1 year ago
Great presentation!
gonrolgonrol 1 year ago
...or as I like to call it, THE DOM!!!!
I totally cracked up when he said that.
Really good tips Zakas. :)
Now I want to create a Javascript video game called, "THE DOM!".
thirdimage 2 years ago 4
javascipt rules teh internets !!!!1
makemenuconfig 2 years ago 4
Great stuff
frncy54 2 years ago
This has been flagged as spam show
Yoo!, check my channel!
if you subscribe me, i subscribe you back =] !!!
SO DO IT PLZ!!!
---
Yoo!, check mijn kanaal!
als je mij abonneert, abonneer ik jou terug!
DUS DOE HET AUB!!
Thanks =]
FunkyyMusic 2 years ago
will this speed up my runescape
thewhiteone102 2 years ago
Yes
theimben 2 years ago
EPIC FAIL!!
legonxtgamemaker 2 years ago
i laughed at THE DOM too! humourless google employees...
nathan87 2 years ago 59
Great stuff!!
warwound 2 years ago 3
This comment has received too many negative votes show
ill just stick to installing os when they get infected
witecracker2 2 years ago
This comment has received too many negative votes show
its all java to me????
huh///
i don't know what the hell it is ...sorry folks,made an ass of myself for nutin
witecracker2 2 years ago
This comment has received too many negative votes show
Is Nicholas on some sort of hunger strike?
georgehennessy 2 years ago
This has been flagged as spam show
Nice work. keep it up. mean time come for social media marketing for esteembpo**com dfgdfg
MonroeOgden 2 years ago
This has been flagged as spam show
the best tip i ever got for makeing fast programs was actualy useing c, c++ or c#.. and if i wanted the fastest programs ever then id have to learn assembler language :P in anycase iam still avoiding java like the plague, its still a memory hog, it runs patheticly even if you write perfect java its still not possible to avoid these issues on spesific program needs, java is only good for one thing
and whit that said java isnt good for much other stuff exept some decent or avarge minor programs.
FusionNinjin 2 years ago
Java and JavaScript are not the same thing. Other than that, this comment is completely valid. :\
folding12 2 years ago
Comment removed
FusionNinjin 2 years ago
Javascript and Java are not related in any other form than their names.
In terms of slowness, and virtualization, javascript is even much slower than java, because java at least compiles to bytecode (and can do pretty good optimizations because of it's strong typed syntax), whereas javascript is interpreted from source code (until now... =P)..
Look, don't take me wrong, I'm a C/C++ person too. But I do have respect for Java and those "tiny apps" called eclipse, OpenOffice, etc.
EpiDe 2 years ago 4
OpenOffice is mostly written in C++ though.
LVEB001 2 years ago
Comment removed
FusionNinjin 2 years ago
Well.... where to start... if you are not sure about the difference between java and javascript, I think you might be a little naive on other things as well. Nothing bad with that, but since I've been programming in some way for 20+ years, I might give you my 2 cents.
If you want most programs to run fast, write them in a high level language and spend the time by learning to use the provided libraries, and improve the architecture. Don't turn to pointers for performance. Btw my choice is Python.
pterry4president 2 years ago
Comment removed
FusionNinjin 2 years ago
You're happy with python yet knock java for performance ?
ludamad 2 years ago
This comment has received too many negative votes show
Java programs are the slowest most resource hungry programs out there. Not to mention, Java's virtual machine tends to bog down after running for awhile on your server. Python doesn't seem have these problems.
thirdimage 2 years ago
@thirdimage
Java!=Javascript
gonrolgonrol 1 year ago 2
The DOM was great.
TimmermanV 2 years ago 2
Very pragmatic presentation, real situations with solutions which are measured and tested. Nicholas Zakas is a great speaker for me. Thank you for sharing your knowledge!
keemor 2 years ago 43
@keemor
He is a very good speaker and makes some interesting points, I just wish he didn't make every phrase he utters sound like he is asking a question!
khajisavva 1 year ago
@keemor Only few tech talk or Google videos has the quality of this video. Straight to the point, and which every other talk was this easy to understand for beginners. He is good!
htmlmm 6 months ago
This comment has received too many negative votes show
can any one help me to develop website
khasruabid 2 years ago
as a newb web developer, I appreciate this presentation
phoenixar 2 years ago 5
so do I. Thank you. It was a pleasure listening to you guys.
s7arfir3 2 years ago 4
This comment has received too many negative votes show
These "tips" are ridiculous! Seriously, optimizing the scope depth?
FARBR0RBARBR0 2 years ago
The DOM!!! I laughed so don't feel bad!
PuercoPop 2 years ago 2