5 ms·
Java as base platform? Shit, didn't know that, and it totally explains the slowness on anything <8GB and spinning rust instead of a HDD. Can anyone please tell
by mschuster91 11y ago
Java as base platform? Shit, didn't know that, and it totally explains the slowness on anything <8GB and spinning rust instead of a HDD.
Can anyone please tell me a reasonably complex GUI program in Java that is actually fast and resource-efficient? Counter-examples include IDEA, Lotus Notes, JDownloader, SAP...
I believe that while Java may be a nice programming language, you import slowness and resource starving of your system by using it.
- V-2 11y agoHm, I write Java for a living (Android) and Java being a nice language would be one of the last things about it to come to my mind...
- campers 11y agoHave you looked at using Kotlin instead?
- V-2 11y agoYes! Much of an improvement, definitely. Especially since it approaches maturity now. It's going to take a while until it gains wider acceptance as a production language in commercial projects though.
- mobiuscog 11y agoAndroid is mostly the Android APIs and 'way of doing things' though. It certainly isn't the same as desktop or Enterprise Java. I've been writing Java for over 15 years and still don't want to write Android apps in any capacity. It certainly has quirks and issues (as all languages do) but I'd say it'a as 'nice' (if not more so) as most popular languages.
- V-2 11y agoWell, maybe, but that's because the most popular languages happen not to overlap with particularly nice ones ;) Java certainly feels dated (I know it's trying to catch up).
- mark_l_watson 11y agoOccasional slowness is probably not caused by Java, but by background code inspections and indexing. Try setting IntelliJ (and RubyMine, etc.) on mobile/energy saving mode and you will have a faster experience, but with less functionality.
- puppetmaster3 11y agoYou can make it MUCH faster by adjusting the VM settings if you want. They set the config as low as possible (because I guess some developer may have a low end machine)
- StevePerkins 11y agoI'm not so much arguing as I am simply asking... what would you recommend instead for cross-platform desktop app development? * GTK and even Qt are criticized for looking non-native or even ugly, and for being limited in their available components. * Going the Atom route, of embedding Chrome and writing your app in HTML and JavaScript, is daft. The languages are poorly suited for the domain, installer bundles are fat and bloated, and the results are so slow and sluggish that they make Java apps look like assembly in comparison. * Writing native versions for each target platform multiples the development effort, and the number of issues. Java isn't perfect (nothing is), but it really does stand up well against the likewise-imperfect alternatives. If you use modern JavaFX, or customize Swing as I believe JetBrains has done, then users really aren't even aware that they're running a Java application (you just admitted to being unaware that IntelliJ was written in Java). Nothing touches Java for ease of cross-platform development, and packaging and deployment is comparatively simple. If your Java app performs sluggishly, then it probably isn't because of the UI anyway. You're seriously citing a huge IDE, Lotus Notes, and freaking SAP as benchmarks?
- mschuster91 11y ago> what would you recommend instead for cross-platform desktop app development? Write a web app and distribute said web app with browser runtimes. Either Chromium or Firefox. JavaScript might be a PITA, but you get a highly performant layout/UI engine, styling and portability for free. Downside is that for stuff not supported in JS, like filesystem I/O or raw socket networking, you'll need either custom bindings or a NodeJS/PHP/... proxy service, but that's imho acceptable. > If your Java app performs sluggishly, then it probably isn't because of the UI anyway. You're seriously citing a huge IDE, Lotus Notes, and freaking SAP as benchmarks? These are widely used Java apps, developed by (in case of Notes and SAP) multi-billion dollar companies, and if even these massive resources cannot get speedy apps done, I might think it's the language/runtime environment at fault here.
- StevePerkins 11y agoI addressed your idea specifically in the parent comment. The most prominent webapp-on-the-desktop example that I can think of is the Atom text editor. It runs like crap, and its installer is roughly 20 TIMES fatter than Notepad++ or Vim's. You could ship the Java-based "jEdit" application, along with a full embedded JVM, and still be 25% lighter. And the desktop app is written in JavaScript. If that sounds like a great idea, then there's really nothing else to talk about from here.
- chvid 11y agoI right now I am switching back and forth betweeen doing Java 8 in IntelliJ and Swift in XCode. And IntelliJ is not the one that is slow and heavy.
- geodel 11y agoI agree with that. After working with it for long time Java as a language / platform encourage super bloated applications. If IBM / Oracle's code is bloated and memory hungry and including core Java libraries then its mostly Java problem at root not the developer problem.