Jerry,
Are you trying to output HTML? If so, you should consider:
1) using CSS instead of the font tags
2) use an XSLT transform or transform the text as you output it rather
than doing it in memory.
-Richard
Jason Lea wrote:
What is textFormat?
It isn't a StringBuilder is it?
textFormat.append(subText);
Eric Plante wrote:
for (Integer posLetter: positions){
String subText = fullText.substring(start, posLetter);
textFormat.append(subText);
subText = null; //not required
start = posLetter + 1;
}
with fullText = 5M and textFormat that's even bigger it crashes.
An friend tried with a 15M file using Lingo language and it worked
without
problems and I bet .NET would have no problem either but I'll know
tomorrow.
----------------------------------------
Sorry to hear that.
Would you please show some source code relative to the problem?
Well, 5000 loops of substring with a big string is terrible.
2005/11/29, Eric Plante <[EMAIL PROTECTED]>:
It wasn't there but I added it and whatever I used -Xmx or -XX, it
didn't
work. I wrote 100m for the -XX...
I also checked again where I could optimized and where I could find
memory
leakage. Reducing the number of string meant using StringBuilder's
insert....the slowness of that command makes it not an option. I
couldn't
find any memory leakage.
Where the program systematicaly crash is a loop where I do a
substring of
the big string everytime(about 5000 loops).I then fill a StringBuilder
which
will eventualy be bigger than the main string. That's the fastest way I
can
do what need to be done and it needs to be fast.
I'm starting to loose faith in Java...I'll ask a friend that
isa.NETspecialist to see if.NET has that problem too...a problem Java
shouldn't have...
-----------------------------------
I found in my catalina.bat:
set JAVA_OPTS=
Instead of that, use:
set JAVA_OPTS=-XX:MaxPermSize=10m
-Xmx512m seems only increase max size of heap rather than perm
division.
2005/11/29, Eric Plante <[EMAIL PROTECTED]>:
I found the required catalina files and I see 4 lines with the
JAVA_OPTS
variable. I tried replacing JAVA_OPTS and then %JAVA_OPTS% by -Xmx512m
in
the catalina.bat file but I still get the error message, what am I
suppose
to do in that file?
----- Original Message -----
From: "netsql" <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Sunday, November 27, 2005 10:09 PM
Subject: Re: OT: OutOfMemory
http://tomcat.apache.org/faq/memory.html#adjust
Eric Plante wrote:
I'm on windows XP and the only catalina files that might serve for
configuration are Catalina.properties and catalina.policy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]