aspose file tools*
The moose likes Performance and the fly likes performance in desktop applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "performance in desktop applications" Watch "performance in desktop applications" New topic
Author

performance in desktop applications

Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

i am very happy to say that, i am a big fan of Java. in general, the performance of java desktop applications when compared to the applications developed with other native languages are slow and memory consuming. a simple drawing program in java takes up to 50MB of ram and utilizes nearly 90% of CPU. after spending a lot of time on this issue in the internet and referring some books and tutorials, i came to understand that there is no way to deal with this problem and i have to compromise the performance, in order to develop the desktop applications using java. but there are so many desktop applications developed by using java. i have downloaded some of them and run them on my pc. they revealed the same point.
1) but how the users will use these applications in the real time ??
2) if i want to consider the performance and memory consumption of my application, am i need to switch to some other native programming language ??

please guide me if i am wrong . . .
Thank you.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11417
    
  16

Do you have ANY supporting documentation for these claims? The myth that java is slow and a memory hog has been around for years, and it's just not true.

quite frankly, 50 MB of RAM is nothing these days. I just pulled my my task manager, and Firefox is using 134 MB, google chrome is listed twice using 31 and 27 mb each, and then I have seven other apps each using 10-25 MB each. I have a gig of physical memory (and my machine is old). 50 mb of ram would be 5% - not much at all.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42282
    
  64
Well, the claim wasn't that Java is slow, the claim was that Java desktop apps have poor performance. I would second the notion that many (if not most) Java desktop applications certainly *feel* sluggish compared to apps written in native languages. Of course, there is no such thing as "desktop performance" in general - different apps do differently complex things, and different users perceive performance differently, so I don't know that any meaningful comparison can even be done.

I haven't done enough desktop programming to have an opinion on whether the perceived slowness of Swing apps is because developers just don't know how to write performant Swing apps, or whether it's an innate characteristic of Swing, or whether the best GUI app developers simply go where the money is (which is not in Swing apps, that's for sure).

(As an aside, I think there are few apps that leak memory faster than Firefox, so I wouldn't use its memory figures as a guide for anything.)


Ping & DNS - my free Android networking tools app
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Ulf Dittmer wrote:Well, the claim wasn't that Java is slow, the claim was that Java desktop apps have poor performance. I would second the notion that many (if not most) Java desktop applications certainly *feel* sluggish compared to apps written in native languages.


I'll disagree with that statement. I use a couple of Java desktop apps on a daily basis, Eclipse, JEdit, SmartCVS, and I've never been unhappy with their performance.
In the OP's defense, When I have worked with Swing, I've found a particular frustration when working with images. One has to closely manage image instances and be very familiar with what's going on in the API or it is very easy to leak memory.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Sanjeev Charla
Ranch Hand

Joined: Apr 02, 2009
Posts: 90

thank you for your valuable responses . . .
in my previous post, i forgot to include this statement " . . memory is not a big issue because we are using, GBs of ram now a days."
and, there are some benchmarking results which shows the performance differences between the languages. and i don't want to compare them while i am using java, because every language has its own pros and cons.
Yes, firefox has a 130 MB foot print in the memory, but if we want implement the same functionality using java, how much memory that java version takes?? after adding all the extensions, addons to that java version can we get the same responsiveness and interactivity as the native firefox??
i heard that system applications (device drivers etc . . .) can only be implemented in native languages.
is that one be the only difference to select which language to be used to implement an application ??
in other words, on which basis can i select a native language over java to implement an application??

thank you,
Shashank Ag
Ranch Hand

Joined: Dec 22, 2009
Posts: 88

Well I have been into java desktop applications from some time now.
What I have seen that, there was some sluggishness in swing based apps until we started to use Java 1.6
It has a huge performance improvement as compared to Java 1.5, although I also found performance improvement was mainly over windows platform.


SCJP 91%, SCWCD 97%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: performance in desktop applications