JSFoo 2017

JSFoo is a conference about JavaScript and everything related.

Scheduling background tasks in JavaScript to boost performance and DOM interactivity at large scale.

Submitted by Vivek Jagtap (@vivekjagtap011) on Jun 15, 2017

Section: Full Talk Technical level: Intermediate Status: Confirmed & scheduled

Abstract

JavaScript is single threaded, and your functions often needs to be run as soon as possible, but at the same time, you don’t want it to get in the user’s way.
For example, you send analytics data when the user is scrolling the page, or you append elements to the DOM while they happen to be tapping on the button, your web page / app can become unresponsive, resulting in a poor user experience.
With requestIdleCallback, requestAnimationFrame and a scheduler, we wil see how to schedule or put less priority/non-essential tasks in queue, and execute them without getting in the user’s way.
We will also see, how to priotize tasks so that user does not feel the lag.

Outline

Will be showing first how webpage starts becoming unresponsive when DOM elements increases (e.g. placing thousands of markers on map), how other elements on page becomes unresponsive while scrolling, and how requestIdleCallback and requestAnimationFrame combined with technique called scheduler can help to avoid these hiccups.
Will be showing after using scheduler combined with requestIdleCallback and requestAnimationFrame, how user interctivity on page becomes smooth.

Speaker bio

I work with Housing.com as part of Front End team.

Slides

https://youtu.be/vkKGtGOsqa4

Preview video

https://www.youtube.com/watch?v=gq18iKeFfLI

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('You need to be a participant to comment.') }}

{{ formTitle }}
{{ gettext('Post a comment...') }}
{{ gettext('New comment') }}

{{ errorMsg }}