Lower-level patch API
See original GitHub issueHi,
As some may know I am experimenting with running Cycle in WebWorkers. It works pretty well, but the main bottleneck is the postMessage API. Right now I am transmitting something i call vDOMSON, representing the entire component vTree, this is then mapped recursively to snabbdom/h
which in turn is passed to the patch function.
To reduce I/O I thought it could be neat to have patch in two parts, so instead of transmitting the entire vDOMSON, I can just transmit a list of mutations. The pre-patch could be run in the sub-thread, while the resulting mutations could be transferred to and applied in the main thread.
I know it sounds kind of insane.
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
HTTP PUT vs HTTP PATCH in a REST API
In this quick tutorial, we're looking at differences between the HTTP PUT and PATCH verbs and at the semantics of the two operations....
Read more >All you need to know about why and where to use Put vs Patch
We are very glad to start the REST APIs made easy course with the very first video on fundamentals of REST APIs, HTTP...
Read more >PATCH method on exposed REST services
PATCH method allows a new HTTP method when exposing REST APIs that applies partial modifications to a resource.
Read more >Serverless API Essentials: PUT vs PATCH
If a resource has elements to it that are under a level of access control or it is too large to feasibly ask...
Read more >The case against the generic use of PATCH and PUT in REST ...
There is a lot of confusion among developers on how to implement updates using a REST API. The tools we are given (...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@aronallen title change OK with you?
@aronallen check out snabbdom’s
DOMAPI
. It’s essentially a wrapper for anything that actually touches the real DOM. Perhaps you can send serializations that refer to calls of those methods.The cool thing about snabbdom is that you can pass an instance of
domAPI
toinit()
.I know some of these methods take
Element
as argument, but this is actuallyvnode.elm
, so it could be thatvnode.elm
on the web worker side is just some kind of virtual pointer (a string, if nothing else) to an element on the DOM.Just an idea…