Speed Up Your JavaScript

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • Google Tech Talk
    June 4, 2009

    ABSTRACT

    Web Exponents: Speed Up Your JavaScript
    Presented by Nicholas C. Zakas.

    As an interpreted language, JavaScript is filled with hidden performance issues that conspire to slow down your code and ruin the user experience. Learn exactly what is fast, what is slow, and what you can do to squeeze that last bit of performance out of your JavaScript code.

    Nicholas C. Zakas is the author of Professional JavaScript for Web Developers, 2nd Edition (Wrox, 2009), co-author of Professional Ajax, 2nd Edition (Wrox, 2007), and a contributor to Even Faster Web Sites (O'Reilly, 2009). Nicholas is principal front end engineer for the Yahoo! homepage and is also a contributor to the Yahoo! User Interface (YUI) library.
    The Web Exponents Series is hosted by Steve Souders
  • НаукаНаука

Комментарии • 61

  • @KPSrinivasa
    @KPSrinivasa 13 лет назад

    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"

  • @kartheepan84
    @kartheepan84 12 лет назад

    Excellent presentation. The best part of the presentation is that every small code changes and how would affect in the different browser with statistics.

  • @leviroberts3085
    @leviroberts3085 10 лет назад +5

    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.

    • @steveburrus5526
      @steveburrus5526 8 лет назад

      +Levi Roberts you don't think that functioins and their scopes play into how fast Javascript is for web develoment?

    • @leviroberts3085
      @leviroberts3085 8 лет назад

      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.

    • @steveburrus5526
      @steveburrus5526 8 лет назад +1

      +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.

  • @sing-tech
    @sing-tech 9 лет назад +3

    So amazing, the best tech talk I've seen.

  • @TheHihoGuy
    @TheHihoGuy 13 лет назад

    great speaker with knowhow and great video
    the informations are very useful in the daily use of javascript...

  • @DarrenChen
    @DarrenChen 15 лет назад

    as a newb web developer, I appreciate this presentation

  • @keemor
    @keemor 15 лет назад

    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!

  • @drewhjava
    @drewhjava 12 лет назад

    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.

  • @vagabond268
    @vagabond268 10 лет назад

    Very helpful insight of the internals, i liked the way Nicholas explained scope chain and reflows. Thank you.

  • @thirdimage
    @thirdimage 14 лет назад

    ...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!".

  • @karolbielen2090
    @karolbielen2090 21 день назад

    15 years ago. Now just one epoch, but several at least. Is this video still viable?

  • @krone01
    @krone01 11 лет назад

    absolutely loved this video very insightful and he speaks in a manner which makes it very easy to understand

  • @hertzbergny
    @hertzbergny 11 лет назад

    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.

  • @graczmisiek
    @graczmisiek 10 лет назад

    Valuable tips and unique sense of humour.

  • @FiddlingOnTheRoof
    @FiddlingOnTheRoof 11 лет назад

    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!

  • @s3340985
    @s3340985 11 лет назад

    Great suggestions for the loops! Would've never thought to flip them if it wasn't for this presentation

  • @Hex72
    @Hex72 11 лет назад

    Awesome talk, a great insight into the caveats of JavaScript. I have so many loops to optimise in my game now...

  • @deeroks1
    @deeroks1 12 лет назад

    wish more sites would use this insight.

  • @wesw02
    @wesw02 12 лет назад

    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.

  • @neoreloading
    @neoreloading 10 лет назад

    Excellent Session!... kudos.. keep them coming :)

  • @arbindvishwakarma722
    @arbindvishwakarma722 10 лет назад

    Thanks Nicholas for giving such a important key aspect of javascript.

  • @RickBeacham
    @RickBeacham 11 лет назад

    Good presentation. Learned alot.

  • @stevenmildred55
    @stevenmildred55 11 лет назад

    Great suggestions, didn't really think of these ideas to speed up JS.

  • @SudeepMakwana
    @SudeepMakwana 11 лет назад

    You R One Of Best @Zakas.... i m your Fan ....

  • @flowewritharoma
    @flowewritharoma 13 лет назад

    pretty programatic lecturing talk! thanks through communicating bilateral intelligence.

  • @VicVlasenko
    @VicVlasenko 11 лет назад

    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

  • @yahikouzumaki4955
    @yahikouzumaki4955 11 лет назад

    Really interesting speech.
    I need to optimize my DOM accesses now.

  • @ramsp35
    @ramsp35 10 лет назад

    Cool.. Thanks. That helped me a lot.

  • @Hemo1231000
    @Hemo1231000 14 лет назад

    Thanks....good video

  • @raduandrei1289
    @raduandrei1289 11 лет назад

    Very informative talk!

  • @warwound
    @warwound 15 лет назад

    Great stuff!!

  • @PuercoPop
    @PuercoPop 15 лет назад

    The DOM!!! I laughed so don't feel bad!

  • @TimVerweij
    @TimVerweij 15 лет назад

    The DOM was great.

  • @aliancemd
    @aliancemd 11 лет назад

    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...

  • @LVEB001
    @LVEB001 15 лет назад

    OpenOffice is mostly written in C++ though.

  • @mururoa7024
    @mururoa7024 11 лет назад

    How much of this is still relevant with the latest JS engines? (Chrome 26, IE10, FF19...)

  • @theimben
    @theimben 14 лет назад

    Yes

  • @whatnow1204
    @whatnow1204 12 лет назад

    @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.

  • @RickBeacham
    @RickBeacham 11 лет назад

    Hey where did you get that profile picture from? I recognize it from another site.

  • @yuanwang5253
    @yuanwang5253 10 лет назад

    Cool, Very Informative.

  • @neocoders
    @neocoders 13 лет назад

    All I can think about now is how much refactoring I need to do.

  • @marcky4eva
    @marcky4eva 12 лет назад

    Is the guy asking the question at 53:30 Robert himler?

  • @SimonFerndriger
    @SimonFerndriger 10 лет назад

    Are the main points in the summary at 46:00 still valid today?

  • @ron7416
    @ron7416 11 лет назад

    Nice.

  • @EricPeeters91
    @EricPeeters91 10 лет назад

    @34:05
    addChild is supposed to be appendChild?

  • @clivend
    @clivend 6 лет назад

    do you think this is still actual in 2018 somehow?

  • @Blinkwing
    @Blinkwing 12 лет назад

    42:00 At first I thought it was Steve Wozniak

  • @Cossner
    @Cossner 11 лет назад

    THE DOOOOOOM

  • @nathan87
    @nathan87 15 лет назад

    i laughed at THE DOM too! humourless google employees...

  • @EdmundDipple
    @EdmundDipple 13 лет назад

    THE DOM

  • @folding12
    @folding12 15 лет назад

    Java and JavaScript are not the same thing. Other than that, this comment is completely valid. :\

  • @BilalHijab
    @BilalHijab 15 лет назад

    will this speed up my runescape

  • @robson_sousa
    @robson_sousa 5 месяцев назад

    Today is February 9th, 2024.

  • @khajisavva
    @khajisavva 13 лет назад

    @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!

  • @thirdimage
    @thirdimage 14 лет назад

    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.

  • @hertzbergny
    @hertzbergny 11 лет назад

    scratch that. Chrome 2 beta.

  • @jamesgreene2061
    @jamesgreene2061 14 лет назад

    This speaker is fantastic, but it seems like his wisdom was lost on Google's employees... they didn't seem to care or react!

  • @Rayden150
    @Rayden150 13 лет назад

    8 people dont understand javascript...