Why Java is so slow?
From: <- Chameleon -> (cham_gss_at_hotmail.NOSPAM.com)
Date: 07/30/04
- Next message: Tris Orendorff: "Re: A finer-grain -Xrs option"
- Previous message: SPG: "Re: outputstream question"
- Next in thread: Michael Borgwardt: "Re: Why Java is so slow?"
- Reply: Michael Borgwardt: "Re: Why Java is so slow?"
- Reply: Mike Schilling: "Re: Why Java is so slow?"
- Reply: Roedy Green: "Re: Why Java is so slow?"
- Reply: Roedy Green: "Re: Why Java is so slow?"
- Reply: Tony Morris: "Re: Why Java is so slow?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jul 2004 19:28:59 +0300
I have about 2600 lines of this type inside a text file:
----------------------
20/11/1980/My birth!
31/12/2003/A day before this year.
30/07/2004/A Boring Day!
etc
----------------------
These lines describe historical anniversaries.
I have a web page (PHP) with this theme, and I want to create a Java
application for this (stand-alone).
The problem is this:
PHP wants 0,3 seconds to create an HTML with ALL these lines (all of
2600!!!)
BUT in the same machine Java wants 2 minutes!!!!
So, Why Java is so SLOOOOOW?
I see that: Java adds to output String, first 240 lines in about 3 seconds.
I believe there is a problem with reallocation of String.
Because the String (in worst case) is about 800 KBs long, Can I set an
initial size for String?
- Next message: Tris Orendorff: "Re: A finer-grain -Xrs option"
- Previous message: SPG: "Re: outputstream question"
- Next in thread: Michael Borgwardt: "Re: Why Java is so slow?"
- Reply: Michael Borgwardt: "Re: Why Java is so slow?"
- Reply: Mike Schilling: "Re: Why Java is so slow?"
- Reply: Roedy Green: "Re: Why Java is so slow?"
- Reply: Roedy Green: "Re: Why Java is so slow?"
- Reply: Tony Morris: "Re: Why Java is so slow?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|