Bug 1645528 Comment 11 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Some notes concerning threads:
1. Most vsyncsources use a dedicated vsync thread. The Wayland runs on the main thread though as it turned out to be faster/better (bug 1675680 comment 1)
2. `VsyncParent` runs on the backgroud thread while `VsyncChild` runs in the main thread
3. The IPC done by `VsyncParent` is heavily dominated by `NotifyVsync()`, which is called on the thread the vsync source runs on
4. Thus in `VsyncParent` we currently go vsync-thread->backgroud-thread->IPC
5. In the proposed patch it's vsync-thread->main-thread->IPC - in the Wayland case this means however: main-thread->IPC, which is alredy optimal
6. Arguably vsync-thread->main-thread->IPC is worse than vsync-thread->backgroud-thread->IPC for other vsync sources

So when thinking about potentially moving `TabVsyncParent` off the main thread, it appears to me that the only sensible solution would be to move it into the vsync thread (which, again, in case of Wayland is still the main thread). The background thread, however, does not appear to have any advantages to me.
Some notes concerning threads:
1. Most vsyncsources use a dedicated vsync thread. The Wayland one runs on the main thread though as it turned out to be faster/better (bug 1675680 comment 1)
2. `VsyncParent` runs on the backgroud thread while `VsyncChild` runs in the main thread
3. The IPC done by `VsyncParent` is heavily dominated by `NotifyVsync()`, which is called on the thread the vsync source runs on
4. Thus in `VsyncParent` we currently go vsync-thread->backgroud-thread->IPC
5. In the proposed patch it's vsync-thread->main-thread->IPC - in the Wayland case this means however: main-thread->IPC, which is alredy optimal
6. Arguably vsync-thread->main-thread->IPC is worse than vsync-thread->backgroud-thread->IPC for other vsync sources

So when thinking about potentially moving `TabVsyncParent` off the main thread, it appears to me that the only sensible solution would be to move it into the vsync thread (which, again, in case of Wayland is still the main thread). The background thread, however, does not appear to have any advantages to me.
Some notes concerning threads:
1. Most vsyncsources use a dedicated vsync thread. The Wayland one runs on the main thread though as it turned out to be faster/better (bug 1675680 comment 1)
2. `VsyncParent` runs on the background thread while `VsyncChild` runs in the main thread
3. The IPC done by `VsyncParent` is heavily dominated by `NotifyVsync()`, which is called on the thread the vsync source runs on
4. Thus in `VsyncParent` we currently go vsync-thread->background-thread->IPC
5. In the proposed patch it's vsync-thread->main-thread->IPC - in the Wayland case this means however: main-thread->IPC, which is alredy optimal
6. Arguably vsync-thread->main-thread->IPC is worse than vsync-thread->background-thread->IPC for other vsync sources

So when thinking about potentially moving `TabVsyncParent` off the main thread, it appears to me that the only sensible solution would be to move it into the vsync thread (which, again, in case of Wayland is still the main thread). The background thread, however, does not appear to have any advantages to me.
Some notes concerning threads:
1. Most vsyncsources use a dedicated vsync thread. The Wayland one runs on the main thread though as it turned out to be faster/better (bug 1675680 comment 1)
2. `VsyncParent` runs on the background thread while `VsyncChild` runs in the main thread
3. The IPC done by `VsyncParent` is heavily dominated by `NotifyVsync()`, which is called on the thread the vsync source runs on
4. Thus in `VsyncParent` we currently go vsync-thread->background-thread->IPC
5. In the proposed patch it's vsync-thread->main-thread->IPC - in the Wayland case this means however: main-thread->IPC, which is alredy optimal
6. Arguably vsync-thread->main-thread->IPC is worse than vsync-thread->background-thread->IPC for other vsync sources

So when thinking about potentially moving `TabVsyncParent` off the main thread, it appears to me that the only sensible solution would be to move it into the vsync thread (which, again, in case of Wayland is still the main thread). The background thread, however, does not appear to have any advantages to me.

P.S.: AFAIK there are listeners of `NotifyVsync()` on the main thread anyway, thus dispatching to the background thread probably does not really help in either case. If that is true, the proposed patch would already not regress.

Back to Bug 1645528 Comment 11