Performance Questions Flashcards

1
Q

What tools would you use to find a performance bug in your code?

A

ESLint and JS Bin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some ways you may improve your website’s scrolling performance?

A
  • Optimize images: Large images can take a long time to load, which can slow down scrolling performance. To improve this, you can optimize your images by compressing them and using the correct image file format.
  • Use a content delivery network (CDN): A CDN is a network of servers that delivers content to users based on their geographic location. Using a CDN can reduce the load on your server and improve the speed at which your content is delivered, which can improve scrolling performance.
  • Minimize the use of third-party scripts: Third-party scripts, such as those used for tracking or advertising, can slow down your website. Minimizing the use of these scripts can help improve scrolling performance.
  • Enable browser caching: Browser caching allows a user’s browser to store certain elements of your website locally, so they don’t need to be downloaded each time the user visits. Enabling browser caching can improve scrolling performance by reducing the amount of data that needs to be downloaded.
  • Use lazy loading: Lazy loading is a technique that allows you to load content only when it is needed, rather than loading everything upfront. This can help improve scrolling performance by reducing the amount of data that needs to be loaded at once.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain the difference between layout, painting and compositing.

A

Layout:-

Browser will determine how much space each element takes up and where to place it.

Painting:-

This is the process of filling in pixels. It involves drawing out elements.

Compositing:-

Browser draws element to the screen in the correct order so the page renders correctly.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly