Live data from Hacker News

Web apps are better than no apps

molodtsov.me

31–40 of 199 posts

Re: Web apps are better than no apps

#31

> There are just too many levels, and JavaScrip is an interpreted language, not a compiled one, so by default, it will be orders of magnitude slower than an app written in Swift, Rust, or C++. JavaScript isn't as fast as C++ or Rust, but it's pretty fast. Around the speed of Java and Go in some cases, which are compiled. For a web app the speed of the language is rarely the bottleneck anyway, other than some exceptio…

> I'm honestly surprised the Chromium team hasn't already addressed this with the Electron team somehow by now

Well, a solution might be to share the chromium "vm" across all electron app, but maintaining compatibility will be horribly difficult so, no I guess.

Re: Web apps are better than no apps

#32

> There are just too many levels, and JavaScrip is an interpreted language, not a compiled one, so by default, it will be orders of magnitude slower than an app written in Swift, Rust, or C++. JavaScript isn't as fast as C++ or Rust, but it's pretty fast. Around the speed of Java and Go in some cases, which are compiled. For a web app the speed of the language is rarely the bottleneck anyway, other than some exceptio…

> Around the speed of Java and Go in some cases, which are compiled.

That is quite the claim, I wonder if you have any data to back that up. As it goes against everything I've seen.

Re: Web apps are better than no apps

#33

> There are just too many levels, and JavaScrip is an interpreted language, not a compiled one, so by default, it will be orders of magnitude slower than an app written in Swift, Rust, or C++. JavaScript isn't as fast as C++ or Rust, but it's pretty fast. Around the speed of Java and Go in some cases, which are compiled. For a web app the speed of the language is rarely the bottleneck anyway, other than some exceptio…

> I'm honestly surprised the Chromium team hasn't already addressed this with the Electron team somehow by now Well, a solution might be to share the chromium "vm" across all electron app, but maintaining compatibility will be horribly difficult so, no I guess.

you solve it the same way you do with iOS and Android - an LTS release with careful deprecation of APIs.

Re: Web apps are better than no apps

#34

> There are just too many levels, and JavaScrip is an interpreted language, not a compiled one, so by default, it will be orders of magnitude slower than an app written in Swift, Rust, or C++. JavaScript isn't as fast as C++ or Rust, but it's pretty fast. Around the speed of Java and Go in some cases, which are compiled. For a web app the speed of the language is rarely the bottleneck anyway, other than some exceptio…

> For a web app the speed of the language is rarely the bottleneck anyway

I think there’s some selection bias in this; the apps that get built as web apps tend to be the ones that are not bottlenecked by JavaScript. For exceptions that are pushing the limits of performance, you’ll more often than not find Rust/C++ compiled to Wasm in the stack.

Re: Web apps are better than no apps

#35
post #3

I wouldn't call a an Electron app strictly a wep app, because you can control the browser version it uses. For a real wep app it's the user's choice.

Agree, electron != web-app. It's a native application that I need to install on my local machine with a platform specific binary. A web app can be accessed immediately from any browser on any machine with network access.

Re: Web apps are better than no apps

#36

> There are just too many levels, and JavaScrip is an interpreted language, not a compiled one, so by default, it will be orders of magnitude slower than an app written in Swift, Rust, or C++. JavaScript isn't as fast as C++ or Rust, but it's pretty fast. Around the speed of Java and Go in some cases, which are compiled. For a web app the speed of the language is rarely the bottleneck anyway, other than some exceptio…

> Around the speed of Java and Go in some cases, which are compiled. That is quite the claim, I wonder if you have any data to back that up. As it goes against everything I've seen.

You really should take benchmarks with a grain of salt, but:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

There are others as well like:

https://programming-language-benchmarks.vercel.app/go-vs-jav...

That being said, the specific performance characteristics isn't really the point. Even if you accept JavaScript and Go being similarly fast (same order of magnitude), JavaScript uses way more memory (which I'd argue doesn't really matter, but it's worth mentioning) and the DOM is the main bottleneck in the browser, so WASM won't save you completely there.

Re: Web apps are better than no apps

#37

I hate to agree with this. Web is the best way to cram loads of features into a limited amount of dev time. But still, whenever I use Teams, something like this happens: I click a button, nothing happens. I wait 10 seconds, because teams sometimes just needs a little longer. Nothing happens. I click the button again, it finally starts doing something. 5 seconds later, the thing I wanted appears. And every time it hap…

> 5 seconds later, the thing I wanted appears

Is this an intrinsic attribute of all web apps, or specific to an implementation?

Re: Web apps are better than no apps

#38
As an interim solution, I just wish everyone with a stand-alone app that runs on Electron would let me open it as a tab (E.g Morgen), even though more often than not, the team behind app X would also nerf it's usability if run in a tab (e.g Spotify - can’t sort playlists).

If there is no such option, I just drop it.

Re: Web apps are better than no apps

#39
post #6

"and JavaScrip is an interpreted language, not a compiled one, so by default, it will be orders of magnitude slower than an app written in Swift, Rust, or C++." This statement is misleading and false. The distinction between "interpreted" and "compiled" isn't as clear-cut as it once was, especially in the context of modern languages and runtimes. However, when it comes to JavaScript, here's the general understanding:…

Yes, Javascript is used in browsers and has a few different competing runtimes, and as such, there are a lot of resources invested in making it faster than the other runtimes. As a result, except in only very trivial cases, Javascript is only slower than C++ by about a factor of 2-4. This is a much smaller difference than the "orders of magnitude" mentioned above. The following list of benchmarks illustrates this poi…

Those are microbenchmarks, and as such are misleading when it comes to evaluating JIT-ed languages. They also don’t involve ever touching the DOM, which is a major source of slowdowns in real-world JS apps.

Re: Web apps are better than no apps

#40
post #34

> There are just too many levels, and JavaScrip is an interpreted language, not a compiled one, so by default, it will be orders of magnitude slower than an app written in Swift, Rust, or C++. JavaScript isn't as fast as C++ or Rust, but it's pretty fast. Around the speed of Java and Go in some cases, which are compiled. For a web app the speed of the language is rarely the bottleneck anyway, other than some exceptio…

> For a web app the speed of the language is rarely the bottleneck anyway I think there’s some selection bias in this; the apps that get built as web apps tend to be the ones that are not bottlenecked by JavaScript. For exceptions that are pushing the limits of performance, you’ll more often than not find Rust/C++ compiled to Wasm in the stack.

I've always wondered what kind of apps these are. The vast majority of web apps I use are all CRUD. I can't think of a single webapp or electron app I use which performs heavy computation. Maybe VSCode? But I don't know if any of the computation is happening on the frontend. People have been extolling the virtues of WASM to me for a while but I have yet to find a use for it where it improved the speed of development, since that's the only metric that matters to me working on CRUD apps
Post reply on HN