Hacker News new | ask | show | jobs
by merlish 3150 days ago
I actually really want to know how Discord does it. Do they actually use the DOM, or just draw everything themselves?

Honestly, anyone who hasn't used Discord, I'd recommend installing it just to try it, especially if you're a SPA web developer or you work with Electron. The performance beats native apps, even dealing with very long sections of text that need to be swapped in and out as you scroll.

However they're doing it is probably the way we should be building Electron applications industry-wide.

2 comments

> I actually really want to know how Discord does it.

I tried asking them on Twitter and the reply was ‘magic’.

> Do they actually use the DOM, or just draw everything themselves?

The DOM is fast — what's slow are toolkits or poorly structured code which issues many redundant or poorly timed updates which forces the browser engine to do unnecessary updates.