You say it's faster than Vue, but how much, how did you measure?
[1] https://rawgit.com/krausest/js-framework-benchmark/master/we...
11–20 of 200 posts
You say it's faster than Vue, but how much, how did you measure?
[1] https://rawgit.com/krausest/js-framework-benchmark/master/we...
Nice work! What did you use for building the documentation ?
Thanks! I created a static site generator called Sold [1]. The Moon configuration for Sold is available at the gh-pages branch [2]. [1] https://github.com/kbrsh/sold [2] https://github.com/kbrsh/moon/tree/gh-pages
The syntax is a bit strange, but once you get used to it, it's a pretty simple framework to grok.
How does Moon automatically detect static virtual nodes? What makes Moon faster than the alternatives? Finally, how does Moon avoid GC pressure with large trees?
The compiler treats everything as static by default. When the compiler detects something dynamic (such as a {{mustache}} template), it will mark the current node as dynamic, and the parent node as well. These propagate up the tree so Moon eventually has a render function that is extremely optimized and can skip everything static, and the diff will only hit the nodes that can change. Moon also has a stricter syntax fo…
If you keep the virtual DOM in a typed array, there is not need for relying on the JavaScript garbage collection.
Here's an example:
https://github.com/vandenoever/baredom/blob/master/src/bared...
How does Moon automatically detect static virtual nodes? What makes Moon faster than the alternatives? Finally, how does Moon avoid GC pressure with large trees?
The compiler treats everything as static by default. When the compiler detects something dynamic (such as a {{mustache}} template), it will mark the current node as dynamic, and the parent node as well. These propagate up the tree so Moon eventually has a render function that is extremely optimized and can skip everything static, and the diff will only hit the nodes that can change. Moon also has a stricter syntax fo…
Earlier quoted context omitted.
The compiler treats everything as static by default. When the compiler detects something dynamic (such as a {{mustache}} template), it will mark the current node as dynamic, and the parent node as well. These propagate up the tree so Moon eventually has a render function that is extremely optimized and can skip everything static, and the diff will only hit the nodes that can change. Moon also has a stricter syntax fo…
> There is really no way to avoid GC when you have a virtual DOM. If you keep the virtual DOM in a typed array, there is not need for relying on the JavaScript garbage collection. Here's an example: https://github.com/vandenoever/baredom/blob/master/src/bared...