Using solid
as the main DOM engine in Atom (replacing etch
)
#77
Labels
Projects
solid
as the main DOM engine in Atom (replacing etch
)
#77
Plan
I plan to use
solid
for Atom projects. Atom has its own DOM library calledetch
, which is used in the core of Atom as well as many of its packages.etch
has some limitations, it has an average performance, and forces a certain style of programming.https://github.com/atom/etch
Implementation
To make the transition seamless, I want to make a drop-in replacement library that uses solid as its backend but has the same API as etch.
The documentation of etch gives an overview of the API
https://github.com/atom/etch
These are the source code of the API (
initialize
,update
,destroy
):https://github.com/atom/etch/blob/master/lib/component-helpers.js
and here the
dom
function:https://github.com/atom/etch/blob/9b90d6ad88b90b8a273992c540879b915d9967a2/lib/dom.js#L4
P.S: The other approach is to use meta-programming to transpile etch code to solid code. However, this can be complex, but I am open to that approach too. Something like this babel plugin or this transformer
Benchmarks
In the benchmarks, etch is behind solid so this can be beneficial in general (~25% improvement). This can enhance the responsiveness of the editor.
https://krausest.github.io/js-framework-benchmark/2020/table_chrome_84.0.4147.89.html
The last dramatic change for improving the performance happened back in 2017 by introducing etch. Now it is the time to replace that with a faster modern framework. Even if we do not use it for text rendering, other parts of the Atom can benefit from it.
https://blog.atom.io/2017/06/22/a-new-approach-to-text-rendering.html
https://blog.atom.io/2018/01/10/the-state-of-atoms-performance.html
P.S:
etch-solid
library solidjs/solid#206The text was updated successfully, but these errors were encountered: