Why does Java run slower on a desktop application than on a server application?
-
The response of a Java desktop application is slower than those on JSP and servlets.
-
Answer:
I assume this is a Java Swing application, and the problem is in UI responsiveness. Swing applications typically feel slow and don't look like native applications, as compared with web applications with usually look like any other other web app implemented in other languages. This is because rendering web applications is much simpler - especially plain JSP pages which render to HTML without JavaScript. They are rendered using browsers, which have been optimized by "the browser wars" - as compared to Swing (and even SWT, I think?) which have not received much development effort. There may also be inherent problems in Swing rendering, though I am not familiar with these since I don't use develop on Java GUIs. If the problem is not about UI responsiveness, but about processing, it could be because the running in server mode on the server side is already working on efficient, JIT-compiled code. Besides this, it may not even be a Java problem - but something as simple as, the server has more resources to work on the app than your desktop does.
Miguel Paraz at Quora Visit the source
Other answers
As others say, on modern hardware if your Java GUI program feels slow then it was built wrong. A decade ago i had many developers tell me the book I co-wrote solved all their UI performance issues. http://www.amazon.com/Java%C3%82%C2%BF-Platform-Performance-Strategies-Tactics/dp/0201709694/ref=sr_1_1?ie=UTF8&qid=1362528810&sr=8-1&keywords=java+platform+performance+strategies+and+tactics There is a new edition out now (I didnt write it) but Id suggest getting a copy and reading it: http://www.amazon.com/Java-Performance-Charlie-Hunt/dp/0137142528/ref=sr_1_2?s=books&ie=UTF8&qid=1362528859&sr=1-2&keywords=java+platform+performance
Jeff Kesselman
Related Q & A:
- How can i create a mobile application server?Best solution by Stack Overflow
- Why do I get the error "A network error occured while connecting to the server?Best solution by Yahoo! Answers
- What do you think is a possessional looking font for a web application?Best solution by Webmasters
- Why not to complete a GST application?Best solution by Yahoo! Answers
- Why can't I connect my laptop to a printer that is connected to a desktop pc?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.