- [Instructor] The final API available…in modern browsers regarding executing code…is efficient script yielding.…It's a way to yield control to the browser…before actually running our code.…In this case, it's for normal to high-priority code…that we want to execute.…So it's not low priority.…We want to execute that code as soon as possible,…but we want to do that after the browser…has rendered any changes on the screen.…Typically, we were using the setTimeout zero to do this,…I've been doing this a lot in web apps,…since probably 1998,…but the problem with setTimeout zero…is that it always has some time…that is being used for other purposes,…so it's not going to execute your code as soon as possible…when you are using setTimeout.…
So, instead of doing that,…we can access the new API that is really simple,…it's just setImmediate.…We send a callback,…and the code that we are executing there…will be executed exactly after the browser…has finished parsing and rendering…any pending changes on the screen.…
- Understanding the Performance APIs
- Navigation Timing
- Calculate milestones in the Performance Timeline
- Measuring the timing of navigation, resources, servers, and more
- Reading network and device information
- Optimizing code
Skill Level Advanced
Designing Websites for Performancewith Brian Wood43m 32s Intermediate
1. Reactive Web Performance
2. Performance Basics
3. Measure Performance
4. Decision-Making Helpers
5. Execute Code More Efficiently
Next steps1m 31s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.