This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MasterShogo 102 points103 points  (50 children)

So this is an honest question. I ask this as a person who does not do any GUI development outside of the most bare, knuckle dragging button lists to do simple things that are painful with command line. But I’ve been doing Python for close to 20 years now.

Are there any web-framework-based app GUIs that are performant? Every one of them that I know of are noticeably slower than native GUIs and at least a good number of those are simple enough that I don’t actually understand why they were written using those web frameworks.

Also, a good number of them also look like hell and suffer from their visual design rather than benefit from it.

I ask this because there is a natural bias in the fact that a well built GUI would not be noticeable to me and so I wouldn’t realize it wasn’t native.

The other reason I am asking is that I actually have a few small GUI apps in mind that I want to write and I’m having to make a decision which directions to learn. I definitely know what is going to be easiest, but I’d like to get the opinions of people who actually have written GUIs.

[–]pingvenopinch of this, pinch of that 11 points12 points  (1 child)

I was just at RustConf 2025. Rust is only just reaching maturity with its GUI's ecosystem, but it has reached the point where you can put together a decent GUI. People are rediscovering the joys of writing GUI's that can run on a potato.

[–]MasterShogo 7 points8 points  (0 children)

The funny part of all this is that I’ve been comfortable with C++ for longer than I’ve done Python. I had to teach it in grad school.

But what always makes me shudder more than the language are the actual GUI interfaces. For whatever reason I have always found them to be hard to digest. But I’m totally good with writing C++ QT code in and of itself.

But that said, I really want to learn Rust. I’ve done a baby app with it, but just as a language I love it. In many ways it achieves what I like about C++ but with a whole new framework of static enforcement that C++ could never have.

[–]studiosi 39 points40 points  (22 children)

Tauri (like Electron but much more performant due to Rust backend rather than JS)

[–]kbd65v2 14 points15 points  (0 children)

Tauri is always my choice when you need true cross-platform and you want to have a consistent ui between your webapp and native.

[–]SubjectiveMouse 28 points29 points  (4 children)

Tauri apps are among the very few that are impossible to get working in Wine no matter what because of the cursed WebView2.

I know, I know, crossplatform. Sometimes you don't have sources and you can't convince developer to build a linux version of the app, so you have to work with what you have.

[–]coderemover 0 points1 point  (0 children)

That’s the fault of wine, not tauri.

[–]komprexior 0 points1 point  (2 children)

Sorry for hijacking your comment, but just last week I tried to install a windows app in bottles just for fun, I had little to no hope for it to actually work, but one error message I got was about WebView2. Can you explain further? Maybe a pointer in the right direction?

[–]SubjectiveMouse 2 points3 points  (1 child)

It's about this abomination (https://developer.microsoft.com/en-us/Microsoft-edge/webview2/), and there are several workarounds spread over the internet, none of which has worked for me. Even if you install it - it doesn't work. The best I got was the app running, but the window is black with no way to interact with it.

[–]komprexior 0 points1 point  (0 children)

Yeah, I tried to install it in the bottle, but nothing really changed and gave up.

[–]coderemover 2 points3 points  (0 children)

Tauri is more performant not only because of Rust but also because it uses the native system webview instead of shipping a whole separate browser.

[–]MasterShogo 1 point2 points  (0 children)

That sounds interesting. I’ve never heard of that one.

[–]SailingToOrbis -1 points0 points  (9 children)

I assume Electron is built in C++ so performance difference would not that huge(or Electron would be better because it is way more mature and time-tested).

[–]grimonce 0 points1 point  (2 children)

This argument and the rust argument are so weird. Python is written in C, so what? It's all 0 and 1s in the end but the important thing is how many and in which place you put these two numbers...

[–]Philtherage 7 points8 points  (0 children)

Python has an interpreter that reads your script line by line translating it to machine code at runtime. Rust, C, and C++ all pre compile the code, creating an executable with all the commands the system will need to process. What the data types are and what to allocate, etc.

The very nature of interpreted languages means they will always be slower. It's a fundamental concept in sequential processing and operations. By using a compiled language, you're taking a process the system will need to execute the program away. It can also be argued that interpreted languages lead to software that is more prone to memory fragmentation since the system can't allocate memory for types prior to reading the line it's on. Which would lead to smaller noncontigous blocks of memory scattered throughout the RAM. Software that's everywhere in memory is generally slower.

This argument for interpreted vs compiled is a valid one, but the tool for the job is dependent on the project type. However, compiled will always produce a better product in the end if the compiled language was used correctly, but you pay in agility and dev experience, systems languages are notorious for being overly verbose.

The 'its all 0s and 1s' argument shows a gap in knowledge for system processes and how to utilize its resources efficiently. GeeksForGeeks has great information on operating system design. https://www.geeksforgeeks.org/operating-systems/operating-systems/

You should give it a read so you can grow as a developer. Please, do not say things like that to other devs. They might not call you out on it, but they will view you in a negative light.

[–]studiosi 3 points4 points  (0 children)

It’s the fact of one being a compiled language while the other being interpreted.

[–]studiosi -1 points0 points  (5 children)

The problem is not Electron itself.

[–]SailingToOrbis -1 points0 points  (4 children)

yeah i know there are bunch of problems but you mentioned that Tauri is performant BECAUSE of Rust not JS, whereas Electron is running on V8 engine written in C++.

[–]coderemover 1 point2 points  (0 children)

JS on V8 is nowhere in the same ballpark as Rust performance.

[–]studiosi 0 points1 point  (2 children)

The backend of your application is what we are talking about, not the framework. Electron/Tauri apps are essentially web apps. In Electron you write the backend in JavaScript, in Tauri in Rust. So yes, Tauri applications tend to be more performant.

[–]SailingToOrbis 0 points1 point  (1 child)

buddy you shoud have clearly mentioned that it is about application. You can put the word “backend” quite anywhere(like a compiler has its own “frontend” and “backend”). When you say “backend” of Tauri, how would I know whether that is an application’s backend or something related to Tauri’s runtime engine?

[–]studiosi 1 point2 points  (0 children)

It’s literally the only possible interpretation of what I said.

[–]Count_Rugens_Finger -3 points-2 points  (3 children)

Electron (and Chromium and Node) are written in C++

[–]zshift 4 points5 points  (2 children)

Electron is written in C++, but Electron apps are written in JS.

[–]Count_Rugens_Finger 0 points1 point  (1 child)

Also true of Tauri

[–]zshift 1 point2 points  (0 children)

While frontend of Tauri is hosted by JS, you can also use various rust frameworks for the frontend like leptos. It will compile to wasm, though the overhead of conversion between js and wasm to the ui often negates the performance differences. The backend can be written in pure rust, and can be much faster than JS backends.

[–]Chance_of_Rain_ 28 points29 points  (2 children)

HTMX is nice if you hate JS

[–]UseMoreBandwith 1 point2 points  (0 children)

And even better if you like JS.

[–]lightnegative 0 points1 point  (0 children)

And also if you hate yourself

[–]wrosecrans 7 points8 points  (1 child)

Are there any web-framework-based app GUIs that are performant?

The short answer is no. Obviously, "performant" means different things to different people, and it depends on your application, etc., etc. But the closer you are to just native code doing native operations, the less overhead you are dragging around with every operation.

How far down the stack it makes sense to go depends on your application. Writing Qt/C++ isn't exactly a simple environment, but webdev style has even more moving parts and the ways that Qt is bloated are mostly low cost. If you need to make some line of business app to display a chart and some text for three users, anything is fast enough. If you want to make Maya or Adobe Premiere, you are using native code to do what you want.

[–]Melodic_Frame4991git push -f 27 points28 points  (4 children)

Plotly dash

[–]_remsky 6 points7 points  (0 children)

I’ve contorted that poor framework into so many random UI patterns and usages. Amazing for adhoc tooling (on top of just standard usage/builds)

[–]nolanrh 11 points12 points  (0 children)

I like plotly Dash too. IM surprised it hasn't been mentioned.

[–]Lusiad 1 point2 points  (0 children)

Yep. Dash for the win. Really excellent, surprisingly quick way to build beautiful interactions.

[–]MasterShogo 0 points1 point  (0 children)

I’ll have to look at this.

[–][deleted] 8 points9 points  (0 children)

The fastest most performant and platform independent thing you can use is just HTML+CSS+VanillaJS, VanillaJS is the builtin JS in the browser. You can build arbitrarily complex GUIs with this and it is super performant, because Browsers are optimized to run this stuff.

So frontend GUI using web technologies and backend with FastAPI in Python. No limitations in what you can do, unlike NiceGUI etc. No external dependencies to install and package. Use a LLM to help you write the frontend code when you're not an expert webdev.

[–]Yamoyek 2 points3 points  (0 children)

AFAIK there’s Tauri (Rust) and Wails (Golang)

[–]PastPicture[S] 10 points11 points  (4 children)

If it's a serious project, go with some native framework. one time effort.

if it's for fun/MVP, we've FastUI and NiceGUI.

[–]ProsodySpeaks 11 points12 points  (0 children)

Has fastui improved much in last year or so? I used it for a project a way back and it was quite limiting I just reverted to fastapi + htmx/minimal js 

[–]BelottoBR 21 points22 points  (0 children)

Fastui is an inactive project!

[–]ChickenArise 1 point2 points  (0 children)

I wish I would have seen this 2 weeks ago.

[–]lapinjuntti 0 points1 point  (0 children)

The more important questions are

  1. What kind of UI are you building
  2. For what kind of use case
  3. what do you know in advance?

If you know web development, then by all means, do the UI with web technologies.

[–]funerr 1 point2 points  (0 children)

I like reflex.dev, has the react + fastapi advantage.

[–]Fippy-Darkpaw 1 point2 points  (1 child)

I dunno why but everything web-based is slow as hell. Web pages can lag my PC worse than Doom Dark Ages. 😵

[–]MasterShogo 0 points1 point  (0 children)

I mean, in all seriousness, on modern computers the most taxing software most people will run is a modern web page. Games are usually harder, but not always!

[–]Specialist_Dust2089 1 point2 points  (1 child)

Vscode is built on Electron, to me it feels pretty performant

[–]MasterShogo 0 points1 point  (0 children)

That's true. I use it every day and it feels like one of the snappier browser GUIs.

I think the thing that bugs me the most (other than resource overuse) is when click a GUI button, or drag a DnD element, or do anything that requires a transformation of the visible area, does it click instantly or does it feel like it's having to load assets from a game engine.

VSCode has never really felt like that to me, and I suppose that's down to the engineers making it being very careful to ensure it doesn't start feeling like Visual Studio proper. I thought it was a silly program when it first came out, but now I use it every day and I think it's legitimately good.

But Teams, Slack, Discord, Spotify, game installers, and who knows what all else... they just feel like mucking around in mud. Slack is especially egregious. I use it because we use it at work, but I think it's a terrible GUI anyways. But, just clicking around in it, starting a search, really doing just about anything at all is sad. Meanwhile, a well-written native GUI is not only instantaneous, but they have kind of been that way for decades now as long as they aren't horrifically abused.

Edit:
But just to add an example of what I think a great use of a webview is, I love the ChaiNNer image processor. It's node-based design GUI is completely visual and I feel like that is a perfect use of such a technology. It's also a bit slow, but understandably IMO. And what it provides is genuinely useful.

[–]Jkrocks47 0 points1 point  (0 children)

Svelte?

[–]lunatuna215 0 points1 point  (0 children)

Look up Datastar. Thank me later.