JavaScript Performance Rocks - Runtime - Part 3 - Runtime

    Amy Hoy, Thomas Fuchs

    e-book
    2009
    116 páginas
    3h 52m
    ISBN-1: 0

    Part 3: Runtime, Cuz Tuning Loops Is Hardcore The vast majority of the problems that the vast majority of apps will have can be solved with loadtime fixes of various stripes. But just in case you're unique, and special, and have particularly intractable issues—or are just a glutton for punishment—we have written a third booklet, all about speeding up code when it runs. You will learn how to write slicker, sexier, faster JavaScript from the get-go. Micro-optimize without being premature. You will learn the kinds of ridiculous optimization tactics that Gentoo tuner boys can only dream of. And yes, we will teach you to unroll loops. This is, by the way, the hard stuff. Most other authors won't even approach it, much less wrassle it to the ground and hogtie it for you... like we do. Not sure where to start when your code is simply... slow? You learned how to profile and benchmark in Part 1, and in Part 3 you'll put all those tricks to work. Think your chosen framework is the fastest? Think again. Learn why you should (or shouldn't) trust speed tests, and the last argument of kings. Wondering if your DOM is dragging? There's no need to shake, we can tell you now: All Signs Point To Yes. Learn about how different DOM structures can stop your code in its tracks, and what to do about it. There's a right way and a slow way to find nodes, crawl trees, insert and remove HTML, and even style nodes. Script timeout warnings getting you down? Sometimes they can't be avoided (because IE is a meanie!). But they can be coped with, and you'll learn how—for each browser. Memory usage out of control? It's true that you can't control garbage collection in JavaScript, but you can give it a nudge in the right direction. Learn how to improve your memory consumption. Is "Ajax" another word for "slow boat to nowhere"? Are your loops custom tuned? Are your operators efficient? All these and more. And yes, we really will teach you to unroll loops—if you must. But only after a thick stack of warnings!

    Estatísticas

    Avaliações

    0 / 0
    • 5 estrelas0%
    • 4 estrelas0%
    • 3 estrelas0%
    • 2 estrelas0%
    • 1 estrelas0%