I think you’re forgetting that javascript in this context needs to be constantly re-evaluating the whole document; It must do this for syntax highlighting alone, not to mention other plugins, spell checkers and auto-completes
but since most editors are also just electron apps, it's not much of a difference