Full Stack Web Performance

Get Started. It's Free
or sign up with your email address
Full Stack Web Performance by Mind Map: Full Stack Web Performance


1.1. frame rate / painting

1.1.1. 1000ms / 60 Hz = ~16ms pixels refresh on screen about 16ms

1.1.2. frames available from chrome dev tools record circle button in timeline? view maybe, or profiles

1.1.3. if a button is clicked in the middle of a frame, if you aren't done processing before frame painting is planned, it skips the frame this is called a dropped frame you do "request animation frame" to get the full 16ms timeframe in order to prevent dropped frame

1.1.4. things that are "on scroll" should do this

1.1.5. do all your reads before all your writes so it's not mixed and you don't waste frame time once the first write occurs

1.1.6. chrome dev tools - show painted rectangles

1.1.7. layer promotion transform: translateZ(0) hack <video> <canvas css opacity animations transforms new spec coming will-change: position will-change spec stop hacking, start being intentional

1.1.8. enable continuous page repainting shows how long to fully paint the screen while nothing special is running (but still needs to repaint) example/demo baseball cards were 14ms to just paint. due to rounded edges with box shadow

1.1.9. CSS Triggers styles -> which parts of painting is effected rounded edges and drop shadows are very computational intensive add shadows to images, not on the fly

2. Server

2.1. Stay local

2.1.1. stay in process if possible DB call cache liberally web service call

2.2. Iterate Less

2.2.1. lowering hit count is usually easier

2.3. Cache liberally

2.3.1. don't do work if you don't have to

2.4. Stream

2.4.1. loading lots of data at once is slow

2.5. Miscellaneous

2.5.1. Use string builder

2.5.2. exceptions should be exceptional

2.5.3. build in release mode

2.5.4. and many more

3. Compute

3.1. chrome profiler

3.1.1. stack trace

3.1.2. flame view width of frame is how long it took to execute on a call stack

3.2. scope management

3.2.1. favor local vars

3.2.2. avoid with() statement adds another scoping layer which means it's another scope table scan for anything outside of it

3.2.3. careful w/ closures same as with()

3.3. looping

3.3.1. avoid for...in loops

4. Resources

4.1. Jank Free . Org

4.2. Books

4.2.1. High Performance Web Sites

4.2.2. Even Faster Web Sites

4.3. bit.ly/full-stack-web-perf

5. Speaker

5.1. Nik Molnar

5.2. @Nikmd23

5.3. NYC

6. Why #perfmatters

6.1. people leave, even for half a second

6.2. User Needs

6.2.1. Functional -> Reliable -> Usable ->

7. Attack Plan

7.1. 1. Measurable Improvements

7.2. 2. Platform Stability

7.3. 3. Environment Neutrality

7.3.1. want environments to be equal

7.3.2. test dev prod, how they cache, cleanup cache, memory management make them equal

7.4. 4. Scenario Focused

7.4.1. Application's aren't slow

7.4.2. Scenarios are slow

7.5. 5. Preset Goals

7.5.1. maybe not 2x faster

7.5.2. we will spend two sprints, or x points on performance

7.6. 6. Descending Granularity

8. Network

8.1. chrome dev tools

8.1.1. Size / Content

8.1.2. Copy all as HAR "site is slow" in China send me har file online har viewer http://www.softwareishard.com/har/viewer/

8.1.3. Chrome audit tools gzip images

8.2. compression

8.2.1. server side - turn on gzip compression

8.3. image compression

8.3.1. tiny png . com

8.4. image sprite

8.4.1. simple in visual studio

8.5. procastinate

8.5.1. script async tag/attribute

8.5.2. img lazyload attribute ie11 only puts lower priority on an image to load it latter

8.6. anticipate

8.6.1. <link rel="dns-prefetch" load dns

8.6.2. <link rel="prefetch" downloads asset make sure it has caching headers, otherwise it WILL request it TWICE

8.6.3. <link rel="prerender" opens hidden tab in browser, downloads page, js, and css renders it, and swaps tabs