4 ms·
I'm the author of the original article. What about bloat? It's hard to compare java to C applications because people don't tend to write the exact same app in
by scumola 17y ago
I'm the author of the original article. What about bloat? It's hard to compare java to C applications because people don't tend to write the exact same app in more than one language, but compare Azurus to utorrent. Sure, Azurus has many more bells and whistles than utorrent does, but are you willing sacrifice an entire machine's CPU/memory to a single app just to get some special features? I doubt it. utorrent is the most popular torrent client because of this very fact. If Azurus weren't just a resource hog, it would be the most popular because of its features, but it isn't. People don't need a million features. They want an app that runs quickly and efficiently and gets the job done.
The same thing with web app development. Just because you work for a company with a huge budget doesn't mean that you should squander the company's money on hardware when it could be done with less. If your whole programming department thinks that hardware is cheap, then before you know it you've got 500+ machines to run a simple website. We're no longer talking pennies here. We're talking hundreds of thousands of dollars and tens of thousands of dollars monthly. That would hire a whole staff of C programmers.
There exist many C libraries that provide the same functionality that java provides. You guys should just bite the bullet, commit yourselves to doing a little manual memory management, drag out your favorite debugger and try writing you next app in C or C++. I'd bet that you'd be very surprised at how very do-able, writing a current-day app in C or C++ actually is compared to java.
Come on, where are my fellow C programming brethren? I know you're out there! Take a break from your desktop app coding and back me up on this! :)
- cagey 17y agoSomewhat tangentially: I run a useful app, JBidWatch (a nice, free eBay "sniping"/monitoring tool) on my Windows XP desktop. I started it 1 week ago following a reboot. One week later I noticed the PC's mem usage was nearing the amount of physical memory and investigated; one contributor turned out to be the JVM session running this app: according to Task Manager, this app (actively monitoring no items during the week) was consuming over 100M of memory. Now, I won't stop using it, because I'm not aware of a better tool, and restarting it is not particularly painful, and yes, it's likely this app wouldn't exist w/o the ease of programming offered by Java (though I would prefer a GUI-less version written in a language I am fluent in), but still: 100M of memory for a web-polling app that was essentially idling (from an end-user perspective)? I've observed that various JVM apps gravitate to these (to me) giant memory footprints over time; I assume it's "the nature of the beast", but I'm speaking as a programmer who has never written a line of Java. A sysadmin sitting in the next cube, responsible for various Java-based server apps, has simply agreed with me that this is what's expected from Java apps.
- scumola 17y agoSee, another fine example of my point. Thanks for that.
- codahale 17y agoYou know, you can set a maximum heap size for JVM processes. It defaults to 1/4th of the physical memory or 1GB, whichever is the smaller.
- JoelPM 17y agoThis sounds like a memory leak (probably sticking items in a hashmap and never bothering to remove them), or nothing has forced a major GC. Java apps that grow in memory usage without bound aren't demonstrating problems with Java - they're demonstrating poor programming. JIT'ing and GC algorithm improvements over the past few years have invalidated a lot of the original complaints raised against Java.