LearnNewsExamplesServices
Frontmatter
id2864
titleTriangle-based worker communication for app => vdom => main => app
stateClosed
labels
enhancement
assigneestobiu
createdAtFeb 5, 2022, 3:32 PM
updatedAtFeb 5, 2022, 4:51 PM
githubUrlhttps://github.com/neomjs/neo/issues/2864
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 5, 2022, 4:51 PM

Triangle-based worker communication for app => vdom => main => app

Closed v8.1.0 enhancement
tobiu
tobiu commented on Feb 5, 2022, 3:32 PM

In case we render & mount a component or in case we do a vdom update, the worker messages are running like this: app => main => vdom => main => app

We can reduce this to: app => vdom => main => app

Screenshot 2022-02-05 at 13 02 55

To do this, we need to create a new MessageChannel for the vdom worker, similar to the ones for the canvas and data workers. However, we only need to register one port (since messages back from vdom still need to drop the deltas inside main).

We still want to delay sending a reply from main to app until the deltas got processed by the renderAnimationFrame queue.

tobiu added the enhancement label on Feb 5, 2022, 3:32 PM
tobiu assigned to @tobiu on Feb 5, 2022, 3:32 PM
tobiu referenced in commit 0905630 - "Triangle-based worker communication for app => vdom => main => app #2864" on Feb 5, 2022, 3:32 PM
tobiu referenced in commit 28467dd - "#2864 worker.VDom: removed the testing logs for direct messages from App" on Feb 5, 2022, 3:35 PM
tobiu referenced in commit 2d8a3e6 - "#2864 comment linking to the ticket" on Feb 5, 2022, 3:44 PM
tobiu
tobiu Feb 5, 2022, 4:44 PM

to enable the same pattern for the SharedWorker scope, we need to match worker ports and appNames inside all available workers.

tobiu referenced in commit eaa0f5e - "#2864 support for the shared workers scope" on Feb 5, 2022, 4:48 PM
tobiu closed this issue on Feb 5, 2022, 4:51 PM