Excellent presentation. The best part of the presentation is that every small code changes and how would affect in the different browser with statistics.
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!
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"
That's the thing. Now with JIT compilers, how relevant is this? The DOM thing for sure didn't change but the rest... For example, the depth navigation should not be a problem with a compiler now... I am interested too...
...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!".
Premature optimization is still a big thing. You generally don't have to worry about these things most of the time. Only optimize when you need to. Usually disk I/O, network, etc are the bottlenecks you have to worry about most of the time.
Steve Burrus I didn't say that. What I was trying to say is that it's unnecessary for developers to spend too much valuable time and company resources optimizing things before they are even a problem. Most of the time, smaller optimizations never actually become a problem. It's one of those things that's bitten several seasoned developers time and time again, me included. It's best to set up a monitoring solution with logs to find out where/what your team needs to focus on the most - then work outward from there. Just don't let it become a problem first. I'll repeat myself once more for clarity. Most generally disk I/O (including databases), network, and other dependencies are usually the bottlenecks that hit first in sever-side apps like Javascript (nodejs) and Go. Focus on minimizing those first before worrying about the functional aspects in your application layer.
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.
I knew about scope chain and the need to always declare var to stay local (otherwise it becomes a global variable and that's SLOW [not to mention being at greater risk of collision!]), but there's a LOT in this that I never knew about!
It's the web man. Last javascript language update was in 1999(not including the recent one). People are still using 12 year old browsers and 10 year old operating systems. Everything is relavant.
@MrDotMontage Buy a book. It's very much worth it. You can't really experience the good and bad parts in javascript from these tutorials. Books is the way to go.
@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!
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.
Excellent presentation. The best part of the presentation is that every small code changes and how would affect in the different browser with statistics.
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!
great speaker with knowhow and great video
the informations are very useful in the daily use of javascript...
So amazing, the best tech talk I've seen.
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"
Great suggestions for the loops! Would've never thought to flip them if it wasn't for this presentation
absolutely loved this video very insightful and he speaks in a manner which makes it very easy to understand
as a newb web developer, I appreciate this presentation
Valuable tips and unique sense of humour.
Very helpful insight of the internals, i liked the way Nicholas explained scope chain and reflows. Thank you.
That's the thing. Now with JIT compilers, how relevant is this?
The DOM thing for sure didn't change but the rest...
For example, the depth navigation should not be a problem with a compiler now...
I am interested too...
Awesome talk, a great insight into the caveats of JavaScript. I have so many loops to optimise in my game now...
Excellent Session!... kudos.. keep them coming :)
Good presentation. Learned alot.
Great suggestions, didn't really think of these ideas to speed up JS.
@34:05
addChild is supposed to be appendChild?
Are the main points in the summary at 46:00 still valid today?
the sick part is that this was 4 years ago, showing a chart with Chrome 3 beta, and I'm using Chrome 29 as we speak.
15 years ago. Now just one epoch, but several at least. Is this video still viable?
...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!".
Premature optimization is still a big thing. You generally don't have to worry about these things most of the time. Only optimize when you need to. Usually disk I/O, network, etc are the bottlenecks you have to worry about most of the time.
+Levi Roberts you don't think that functioins and their scopes play into how fast Javascript is for web develoment?
Steve Burrus I didn't say that. What I was trying to say is that it's unnecessary for developers to spend too much valuable time and company resources optimizing things before they are even a problem. Most of the time, smaller optimizations never actually become a problem.
It's one of those things that's bitten several seasoned developers time and time again, me included. It's best to set up a monitoring solution with logs to find out where/what your team needs to focus on the most - then work outward from there. Just don't let it become a problem first.
I'll repeat myself once more for clarity. Most generally disk I/O (including databases), network, and other dependencies are usually the bottlenecks that hit first in sever-side apps like Javascript (nodejs) and Go. Focus on minimizing those first before worrying about the functional aspects in your application layer.
+Levi Roberts POkay Levi I will defer to you. You a re probably more of an expert about this than I am. I just know a little about JavaScript myself.
How much of this is still relevant with the latest JS engines? (Chrome 26, IE10, FF19...)
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.
good job.
51:30
if there are a lot of global variables (I saw >200 in some apps) it works 2-3 times faster, when grouping them into an object
I knew about scope chain and the need to always declare var to stay local (otherwise it becomes a global variable and that's SLOW [not to mention being at greater risk of collision!]), but there's a LOT in this that I never knew about!
It's the web man. Last javascript language update was in 1999(not including the recent one). People are still using 12 year old browsers and 10 year old operating systems. Everything is relavant.
You R One Of Best @Zakas.... i m your Fan ....
Thanks Nicholas for giving such a important key aspect of javascript.
wish more sites would use this insight.
Is the guy asking the question at 53:30 Robert himler?
OpenOffice is mostly written in C++ though.
Hey where did you get that profile picture from? I recognize it from another site.
Really interesting speech.
I need to optimize my DOM accesses now.
pretty programatic lecturing talk! thanks through communicating bilateral intelligence.
Very informative talk!
do you think this is still actual in 2018 somehow?
Thanks....good video
Great stuff!!
All I can think about now is how much refactoring I need to do.
Cool, Very Informative.
Cool.. Thanks. That helped me a lot.
42:00 At first I thought it was Steve Wozniak
The DOM was great.
The DOM!!! I laughed so don't feel bad!
@MrDotMontage Buy a book. It's very much worth it. You can't really experience the good and bad parts in javascript from these tutorials. Books is the way to go.
will this speed up my runescape
@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!
Nice.
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.
Yes
i laughed at THE DOM too! humourless google employees...
THE DOOOOOOM
Java and JavaScript are not the same thing. Other than that, this comment is completely valid. :\
THE DOM
This speaker is fantastic, but it seems like his wisdom was lost on Google's employees... they didn't seem to care or react!
scratch that. Chrome 2 beta.
Today is February 9th, 2024.
8 people dont understand javascript...