aspose file tools*
The moose likes JSP and the fly likes why java technology slow ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

why java technology slow ?

Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
hi, my question is why java very slow but still gain huge population by software company? is there any specific reason for it ?

i myself actually prefer java because it is really object-oriented but other than this , i have to agree , java is very slow as compare asp, php specially in web application processing, can anyone please guide me on this ? how do i persuade customer to use java product ? thank you !
Saurabh Agrawal
Ranch Hand

Joined: Oct 07, 2003
Posts: 244
Hi alvin ,
Well your question is a valid one that java is slow but that is just one aspect of seeing it.Besides this it has some real advantages that makes it preferrable..One of the adv. u have said that it is an OBJECT ORIENTED language..Secondly it is supported on mutilple platforms..like LINUX and UNIX.. while ASP etc are not supported on such platforms and the trend today is going towards LINUX and UNIX servers for web applications where JAVA would be handy ..This was just one simple example and besides this there are lot many examples which would surely convince you that it is the best ... not just u and me use java
I hope i have given you something as your answer that would convince you,..
Luk always,
Saurabh


Success is not doing extraordinary things but doing ordinary things extraordinarily well.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
is this a troll attempt?

Where's the sudden influx of "Java is slow compared to XXX" coming from?

Compared to ASP and PHP Java/JSP is anything BUT slow, in fact it's quite a bit faster.
Of course if I am an experienced ASP or PHP hacker who knows all the performance tricks out there and I try to rewrite something in JSP of which I know nothing it is likely that the JSP will turn out to underperform, but that can hardly be blamed on Java but rather on the person writing it...


42
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
jeroen, i'm not to offence java , i like java very much in fact, just cannot stand on situation, when some of my friends and colleague mentioned on how nice of c# for window, how fast of php as web application language, and this thing make me think over and over again, how to answer customer, java application have better advantage over others, besides ,

jeroen, u agree java faster than other ? but frankly, i still feel it slower than say c++ ..correct me if i get wrong perception...thank you !
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
C++, compiled and highly optimised towards its intended single hardware/software platform, SHOULD be faster than Java which is optimised for platform independence.
But then, Assembly is faster still (at least potentially) and raw machine code is fastest of all.

Yet many people no longer program in Assembly, preferring C++ instead.
From personal experience I can tell you C can be up to 10 times faster than C++, Assembly maybe 2-3 times faster than C. All that for basically the same code.

At some point what counts more is time to market.
The C++ program of those 3 options would be the fastest to create and maintain and likely contain the least bugs (thus reducing support cost).
Java is an order of magnitude better yet than that while the performance penalty is NOT an order of magnitude greater.
So unless performance is of paramount importance (such as in highly intense number crunching code) using Java can give the customer an economic advantage.
In addition they won't need to maintain separate codebases for most or all of their code in order to support new hardware and software platforms. This too can be a major benefit.

Of course if there's only a single platform that ever needs supporting and the application will be tightly bound to that platform anyway (say direct hardware access) there are better choices than Java and C++ is certainly one of them (though I'd still consider pure C).

But on average, I don't think that for most applications (especially enterprise applications like web applications that have no graphical user interfaces they need to directly display) there is little or no performance impact on using Java except slightly slower initial loading times (and that relative, considering that a servlet or JSP is loaded once during server lifetime while a cgi script has to be loaded from disk every time it is called thus causing loading times for those to be actually longer than those for servlets after the first call).
Srinivas Genji
Ranch Hand

Joined: May 04, 2004
Posts: 37
Hi all
I too have the same doubt,PHP latest version also supports OOPS concept and platform independent.So why java rather than PHP.Thanks
Cheenu


Genji B Srinivas<br />M.Tech (IT) Aus
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
PHP is at the moment where JSP was with 1.0, but without the rich Java platform to back it.

It's quite limited and invites to writing spaghetti code that's impossible to maintain.

Nice for small quick hacks, not very well suited to enterprise level applications.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

i have to agree , java is very slow


Please post the results of your time studies that support this assertion. Or perhaps you have a documented study that proves this?

If not, this is a fallacy and will be considered a troll.

And even if you could prove this assertion, do you think that the difference would be perceptible to the end user? I think not. The rendering time for a page is noise compared to network and database overhead.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
"Java is slow" is the kind of dumb statement we used to get back in the days of JDK 1.02 - are these friends and colleagues in a time warp or something? Or is this yet another "astroturf" desperation attempt by the .NET crowd?
You can write a slow application in any language - just use a poor algorithm.
Go away trolls.
Read this recent benchmark page.
Bill
[ May 25, 2004: Message edited by: William Brogden ]
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
william , thank for article to prove java faster, now i can print it out and show peoples....how java perform sink to other , ...i be great that you share me this information .
Alvin chew
Ranch Hand

Joined: Jan 08, 2004
Posts: 834
and then i found java editor written in java slower than java editor written in c++ ..what are all friend's comments here ?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

look,

no matter how fast you are, there is always someone faster. There is also someone always slower.

As has been pointed out... you might use a 'fast' language/runtime/platform combination, and still turn out a *slow* application of that technology. Let's say for the sake of argument that java *is* the fastest language out there. This sort of absolute statement is pretty much impossible, for *many* reasons. But let's take it on faith for a bit.

Does "the fastest language ever" necessarily guarantee that you will write a performant program?

If you have a program specification, and you code exactly 100% of that spec (not 98%, not 103%) in two languages, one being java ("the fastest") and one being "program language foo.net" (the "other guy")... isn't it possible to produce a foo.net application that performs better than the java one?

What if the programmer did something stupid like:

Now that's a ridiculous example, but I think you get my idea. Any program, written in any language, can die the death of a thousand tiny cuts. Those tiny cuts are otherwise known as:

- poor architecture
- unnecessary object overhead
- memory 'leaks' and related phenomenon
- not optimizing
- using inappropriate algorithms

the list really goes on.
[ May 25, 2004: Message edited by: Mike Curwen ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
There are MANY sites and books devoted to getting the most out of Java. I like http://www.javaperformancetuning.com/ which has a useful newsletter.
Bill
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Don't feed the trolls.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

At this point I feel that the question has been adequately answered, was probably a troll, and has strayed quite a bit from the topic of JSP technology, so I'm going to close this topic.

Further discussion of Java performance can take place in the Performance forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why java technology slow ?