Hacker News new | ask | show | jobs
by lol768 3348 days ago
> I swear Electron is incredibly fast in every instance I've used it

That's really surprising to me, I've had completely the opposite experience. Just resizing a window shows how slow it is to repaint and scrolling is often pretty poor too, and this is on a moderately powerful desktop machine. I really hate to think how it'd cope on an embedded device with an ARM processor. There's a marked difference to me between Atom and e.g. Sublime Text.

> I'm currently working on a Mail application and my benchmark test case is an email account with 20,000 emails to be displayed.

Is this benchmark open source? I'd be really interested to try it compared to something similar build in Qt or Gtk+.

> Even if you need to do complex algorithms, just write that particular part in C and use it in the rest of your JS code like normal.

This might speed up complex background processing, but the fact remains that the UI is built on the DOM with interactions handled by JS. It's just not ideal for a desktop application.

With all that said, I totally understand why a lot of applications are built with these sort of technologies. It's much easier to build a cross-platform application than anything else. The price you pay is that the UX is poor.

2 comments

Don't let Atom be your electron example, it is actually slow. Try VS Code instead.

- signed, former Atom user.

Faster how?

In my experience, VSC's cold boot startup time is just as bad as Atom, and it's not immune to interface jank - for example, when unfolding the "tree view" on one of my projects, I can actually see the folders being painted top to bottom.

But I don't use VSC day-in-day-out (since it's missing multiple project root folder support), so perhaps I'm missing something.

> Is this benchmark open source? I'd be really interested to try it compared to something similar build in Qt or Gtk+.

Afraid it's not, currently the only working copy is closed-source whilst I work on rewriting it all into an open source repository. Having said that, I'm in no doubt that Qt or Gtk+ would be significantly faster than rendering what is essentially a local website.

> I really hate to think how it'd cope on an embedded device with an ARM processor. There's a marked difference to me between Atom and e.g. Sublime Text.

Reminds me of a joke told by a friend of mine:

Friend: "The thing I like about Atom is that it encourages you to write small files."

Me: "How does it do that?"

Friend: "Well, it crashes if you write more than a couple hundred lines."

Personally, I too do use Sublime Text. Not entirely sure how Atom is so slow, but it takes ten times longer to startup and five times longer to search through my files. Definitely caused me to switch away from it.

> but the fact remains that the UI is built on the DOM with interactions handled by JS

Excellent point, but I think if you're doing complex interactions that require a large amount of computing time then you shouldn't be using a program like Electron. For something like a mail application, not much changes. We actually never remove mail items, simply hide them from view, so we have one large render time at start-up and then almost none after that (displaying and hiding an element from view is incredible efficient). For something like atom, you have a significant amount more happening and you want just about everything to be instantaneous. Plus the fact that it's expected to be able to deal with large files consistantly without any hiccups.