Open Bug 1378739 Opened 3 years ago Updated 1 year ago

Use micro-tasks with requestAnimationFrame to prevent UI blocking

Categories

(DevTools :: General, enhancement, P3)

51 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: miker, Unassigned)

References

(Blocks 1 open bug)

Details

Whenever we are showing a list of values we should use micro-tasks. These are requestAnimationFrame loops in order for the list to be displayed row by row without blocking the UI.

In fact, we could write a method for creating microtasks that could optionally run a task in a worker process. A typical micro-task looks like this:
var i = 0;
requestAnimationFrame(myFunction);

function myFunction() {
    // complex stuff for each element.
    i++;
    if (i < array.length)
        requestAnimationFrame(myFunction);
}

Filter on EdgarMallory
Priority: -- → P3
Severity: normal → enhancement
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.