Skip to content

[Schedule]Low priority updates block high priority updates #13597

@koba04

Description

@koba04

TimeSlicing is a great feature, thank you for your great works!
I've been enjoying it, but I have a problem with its scheduling.

I know the scheduler is unstable, this issue is just to tell you a prblem I have.

The problem:

If I have high priority updates and many low priority updates, low priority updates interrupt and block the high priority updates.

How to reproduce:

You can imagine the app is like a spreadsheet app.

You can recognize that low priority updates block high priority updates.
I guess that will become a huge problem with IME composition events.
(Try to type "こんにちは(konnnitiha)")

The following is a timeline I've measured.

screen shot 2018-09-08 at 13 13 26

The source code is here.
https://github.com/koba04/react-timeslicing-demo

The previous version that used requestIdleCallback didn't have the problem.
Because requestIdleCallback runs a registered callback only when the UI thread is idle.

The following is a version that uses requestIdleCallback.

https://react-timeslicing-demo.netlify.com/

screen shot 2018-09-08 at 13 16 16

Should I implement another way to avoid to block high priorities by low priorities?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions