6 ms·
> anyone who is worried about it is having a severe case of premature optimization. I think the "This is a premature optimization" mindset is what leads to sl
by antoineMoPa 4y ago
> anyone who is worried about it is having a severe case of premature optimization.
I think the "This is a premature optimization" mindset is what leads to slow pieces of software that I like to avoid (React, Qt, electron). But I guess it's fine, as most users don't care as much as I do.
- Sakos 4y agoQt is slow now? All the Qt-based applications I've used are as fast as anything else can be.
- simonh 4y agoFrom context it seems poster may believe Qt is some form of web framework, or something.
- antoineMoPa 4y agoNot sure why you believe that, I built some (small) Qt applications so I know it's not a web framework, I was just referring to slow software in general. I think it's less true now, but I remember KDE (Qt-based) being slower and buggier than gnome (Gtk-based) a couple of years ago, just to cite one thing. It just felt like Qt-based stuff was in general more of a pain to use & heavier than GTK based stuff. It's really a matter of personal preference here and Qt is a nice project, just that I have some criticism here regarding performance choices. I feel like bad performance decisions tend to snowball and get multiplied when people make library choices and add their own performance issues on top.
- simonh 4y ago> Not sure why you believe that… Because you included it in a list that otherwise only contained web tech frameworks. It’s not clear to me why you think those are peers of Qt and implied to me that you think they are near equivalents.
- int_19h 4y agoKDE apps tend to use KDE frameworks, which is quite a bit of stuff on top of what pure Qt offers. Pure Qt apps were always comparable to Gtk in performance.
- kaba0 4y agoWith all due respect, you made quite a strong claim based on very little proof/experience.
- antoineMoPa 4y agoYeah I agree, I don't have actual data to back this snowballing effect idea.
- criddell 4y agoAFAIK, Autodesk Fusion 360 is a Qt app and it's very slow compared to similar tools (like SolidWorks).
- cuteboy19 4y agoThe actual processing is slow, not the UI
- inferiorhuman 4y agoFusion is slow in large part because it makes a ton of HTTP requests. The Qt part is fairly performant.
- jrockway 4y agoFusion 360 is kind of a mess that's gotten way out of control. I enjoy how the navigation cube can literally draw outside the boundaries of the window as you move the window around. I don't think that's a Qt problem, I think they glued ten different UI libraries together to keep their legacy code working.
- inferiorhuman 4y agoFusion is probably the newest software product that Autodesk rents. In fact it was Carl Bass' passion project. Unfortunately Autodesk's software development process is… broken.
- ravenstine 4y agoThe fact that it's made by Autodesk is probably the reason that it's slow, not because it uses Qt. Various Autodesk products have been clunky, buggy, crashy, slow pieces of crap (I'm looking at you, Maya) since before they were migrated to Qt.
- dekhn 4y agoThe UI is totally performant for me. The only time it's bogged down was when I was modelling something with > 100k mesh triangles. Or when I do a long UI-blocking processing operation (which isn't in the qt codepath)./
- Kaze404 4y agoEverything is slow when the goal is to just complain about things you don't understand.
- spaetzleesser 4y agoComparing Qt overhead to the insane overhead of JavaScript frameworks is a little far fetched.
- ajuc 4y agoQt has QML which is a js framework :)
- JustSomeNobody 4y agoOptional isn't it?
- Kelteseth 4y agoYou can call js functions in qml, but that does not mean qml is a js framework. Normally you call your c++ functions from qml.
- ajuc 4y agoI don't want to disparage qt+qml, I used it commercially and it's much better than other gui frameworks I worked with. I just dislike people bashing technology for the wrong reason (like it being a "js framework"). In qt+qml usually you connect slots to signals in js, even if they are implemented in c++.
- chrisseaton 4y agoA function call in JS is usually just a few machine instructions. It's an example of a case where a conventional C++ compiler can do less optimisation than a JIT JS compiler.
- int_19h 4y agoI would find it extremely surprising if a regular function call in C++ took any more instructions than in JS. Now a virtual function call, a JIT compiler can devirtualize more often than an AOT compiler. But the vast majority of function calls in your typical C++ app are not virtual.
- dec0dedab0de 4y agoI think you're thinking of the "any optimization will be too diffcult, take too long, and cost too much" mindset. Which is a huge problem. Being mindful enough to identify when you're feeling the urge to optimize something too soon, will let you step back and optimize what will have the biggest impact once it's finished. I have seen developers spend hours optimizing some functionality, pick the fastest technique, and it turned out by designing everything to work with their earlier optimizations they made the overall system much slower.
- sudosysgen 4y agoHow is Qt slow? Do you have benchmarks of Qt vs JavaFX, UWP, SwiftUI or Electron showing that it's slow, let alone comparable to Electron or React? 10x the latency of a virtual function call for a signal is very very small beans compared to where you're actually spending CPU cycles, for any reasonable software.
- antoineMoPa 4y agoQt is heavyweight when compared to say Gtk. But that being said, I agree that Qt perf is much better than electron / JavaFX. I mean everything is a tradeoff. Gtk Is more complex to develop-with than Qt, electron super easy, but super memory intensive. My main point is that we should not always think "This is premature optimization". This mindset makes it very difficult to care about performance in modern organizations.
- sudosysgen 4y agoQt is generally as fast as GTK. It's a bigger library that does a lot more but it is still as fast or faster. I agree that we shouldn't always think "this is premature optimization". However, we should focus our optimization efforts where they matter, and I really struggle to think of a place where signal latency is really crucial. In any well architected software that's going to be really rare and it makes sense to focus your efforts on optimizing other parts of the software, which seems to be what the Qt devs did.