Closed Bug 1178972 Opened 9 years ago Closed 7 years ago

We need a way to postpone execution of non-critical code that could hurt 60fps when it's needed

Categories

(Toolkit :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Yoric, Unassigned)

References

Details

In some cases, we know that we should prioritize 60fps. For instance, when we're scrolling, or when we're playing an animation and we are pretty sure that the user is watching the screen, etc.

In such cases, we want to be able to postpone any non-critical call that could block the main thread and lose frames. Examples:
- Session Restore data collection;
- Session Restore sending data to disk;
- Thumbnails capture;
- Thumbnails writes to disk;
- Garbage-collection;
- Preferences flush;
- ...

For this purpose, we need an API that would let us postpone a task until we are sure that we are not in a performance-critical section.
See Also: → 1158032
See bug 1219145 for a discussion on how we could get the necessary information.
I'm assuming the idleDispatch stuff described in https://ehsanakhgari.org/blog/2017-06-02/quantum-flow-engineering-newsletter-11 means that this can be closed.  Yoric?
Flags: needinfo?(dteller)
Indeed.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(dteller)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.