- [Narrator] A recent addition to the…performance family is the Long Task API.…The long task API will let us detect…when we have some code that is taking the thread…for too much time, so it's a long task.…And we should do something different,…such as using a web worker, or changing the algorithm.…That's not available in every browser today.…In fact it's fairly experimental.…So we need to do something similar to paint timing.…
This is the long task API, we also need…an observer in this case, it's mandatory…to have an observer.…We going to create the long task observer.…It's a new performance observer that…we receive a list and we're going to…first try to observe on that observer and in…this case, the entry type is Longtask, one word.…
We need the catch, and we're going…to observe here for now.…We will just get the entries, all of them…and for each entry, we're going to…execute the very simple code that we'll call Perf,…and we'll say Longtask and for the name,…we're going to specify, Thread used for too long.…(mumbles)…
- 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 Appropriate for all
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.