G
Guest
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?
----------------------
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?