6 ms·
The problem is that your language choice is very limited. You can choose C++, no thanks, or Python which is very slow. There are no good options for languages o
by sime2009 9y ago
The problem is that your language choice is very limited. You can choose C++, no thanks, or Python which is very slow. There are no good options for languages or VMs on Qt in the Java/C#/VM/Jit range of the language performance spectrum.
- danieldk 9y agoThere are no good options for languages or VMs on Qt in the Java/C#/VM/Jit range of the language performance spectrum. Qt had pretty good Java support with Qt Jambi. But nobody cared and they cancelled the product. https://en.wikipedia.org/wiki/Qt_Jambi https://en.wikipedia.org/wiki/Qt_Jambi
- sime2009 9y agoalas, there have been many attempts over the years for language bindings even to interesting targets like the JVM and mono/.Net, but none of them really gained "escape velocity", except for PyQt (which is great might I add).
- sametmax 9y agoPython and js apps have the same order of magnitude of speed. But pyqt apps are way faster than electron
- sime2009 9y agoNo they don't. JS running on a modern engine like V8 are easily 10x faster than CPython which PyQt uses. If you think Python and JS are about the same speed then it is because of Qt itself, but certainly not because of CPython.
- yzmtf2008 9y ago> JS running on a modern engine like V8 are easily 10x faster than CPython which PyQt uses. Citation needed. As I've said numerous times before, saying one language is faster than another is pointless. You have to give a full context around it. What particular scenario is CPython slower than V8? While it's true that a pure CPython tight loop will be slower than one in V8, I have a hard time imagining that being the bottleneck of desktop applications.
- sli 9y ago> As I've said numerous times before, saying one language is faster than another is pointless. Never thought about it this way but you're right. I could very well write an interpreter for C that's slow as molasses and I'd be willing to be that no one will try it and say "C is slow." It doesn't seem like languages that are already interpreted get that courtesy, though. V8 isn't the only JS engine, after all.
- sametmax 9y agoI have coded with both, and practically, yes, they are. The only place where JS would beat Python would be a big loop with number crunching, which you would do with numpy anyway. Or pypy, which is 50 times faster than V8. A desktop app would not see any difference. A sysadmin script neihter. Data analystics is made using numpy/scipy/pandas. Web sites bottleneck are incredibly rarely the server side scripting language, and when it is, you go rust/go. But for our current debate, electron VS PyQT, well yes, the C++ does the heavy lifting and you get to use Python only for the stuff it is good at. Win-win. The problem with using PyQT is making an exe or making fancy graphics is harder than in electron. Everything else, and I do mean everything else, is easier and more performant with PyQT.
- hungerstrike 9y agoYou can't say that "a desktop app/sysadmin script/website/etc would not see any difference" without knowing what the app was doing. An app like VSCode has a ton of shit to do. However, the real problem with PyQT is that Python is relatively garbage compared to JS and that's why it's not nearly as popular as JS.
- foldr 9y ago> pypy, which is 50 times faster than V8. Ehhh V8 is pretty competitive with C for number crunching. Where are you getting that 50 times figure from?
- KaiserPro 9y agothreads.
- foldr 9y agohttp://doc.pypy.org/en/latest/faq.html#does-pypy-have-a-gil-why http://doc.pypy.org/en/latest/faq.html#does-pypy-have-a-gil-... If you're using parallelism for non-IO-related reasons, then in either language, you'll probably end up using multiple processes rather than multiple threads.
- 9y ago
- todd8 9y agoI haven’t tried it, but isn’t JavaFX supposed to be the future of JVM based GUI’s? I’m actually very curious about others experiences with it.
- sesteel 9y agoI just went through a simple exercise; for my tests, a minimal JavaFX app starts at ~100MB while a minimal Electron app starts around ~65MB.
- olzd 9y agoSo? If you want a lightweight app, both JavaFX and Electron are bad.
- Aaronmacaron 9y agoThis is only the case if you bundle the JVM with your application. Without the JVM you can write a simple application without exceeding the .jar file size of 1 MB.
- sesteel 9y agoI should have been more explicit; this is the default in memory footprint of a simple hello world app. I didn't really try to reduce the heap or stack of the JVM, I'm sure that would help.
- Aaronmacaron 9y agoOh I think this is a misunderstanding. I thought you were talking about the binary file size which is very big for electron apps since they ship a full-blown browser. It is possible that JavaFX apps also use a lot of memory (RAM) but I was referring to the file size of the .jar file of a JavaFX app.
- whyever 9y agoIf you just count the JS and HTML, then a minimal Electron app is (hopefully) also tiny.
- KaiserPro 9y ago> Python which is very slow well it might in relative terms, but a pyqt app is almost certainly going to be an order of magnitude faster than electron.
- pknopf 9y agoA project I'm working on: https://github.com/pauldotknopf/net-core-qml https://github.com/pauldotknopf/net-core-qml This will allow you to fully interoperate Qml and .NET (Mono/.NET Core/Full Framework).
- tluyben2 9y agoThanks for working on that. I've been trying to use Avalonia and it already drives me slightly insane.