The problem with electron is not the implementation - after all it is a bundled web browser and those are really really performant and written in C++. They pretty much make displaying a HTML document with complex CSS and running JavaScript as fast as possible (or at least close to it)
The problem is the abstraction level, instead of a locally running program manipulating objects that are turned into render instructions basically in a one-to-one fashion, there is a whole added indirection with generating and parsing HTML and then converting the dynamically created DOM into renderable elements.
The problem is the abstraction level, instead of a locally running program manipulating objects that are turned into render instructions basically in a one-to-one fashion, there is a whole added indirection with generating and parsing HTML and then converting the dynamically created DOM into renderable elements.