Re: OutOfMemoryException Processing Velocity Template

2006-02-08 Thread Malcolm Edgar
Yes my experience with the singleton memory leak was with Tomcat, when it was auto reloading the application when class files changed. regards Malcolm Edgar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

RE: OutOfMemoryException Processing Velocity Template

2006-02-07 Thread e v a n
: Re: OutOfMemoryException Processing Velocity Template If your are reloading your application a lot, i.e. doing development work, the singleton pattern causes a memory leak. This could be expressed in OOME when rendering templates. regards Malcolm Edgar On 2/7/06, Nathan Bubna [EMAIL PROTECTED

RE: OutOfMemoryException Processing Velocity Template

2006-02-07 Thread Barbara Baughman
Edgar [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 8:35 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template If your are reloading your application a lot, i.e. doing development work, the singleton pattern causes a memory leak. This could

Re: OutOfMemoryException Processing Velocity Template

2006-02-07 Thread Will Glass-Husain
PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org Sent: Tuesday, February 07, 2006 1:33 PM Subject: RE: OutOfMemoryException Processing Velocity Template And here all the time I thought it was a Tomcat issue with reloading. All of my web applications use the VelocityEngine rather

RE: OutOfMemoryException Processing Velocity Template

2006-02-06 Thread e v a n
: Saturday, February 04, 2006 4:35 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template Are you using Velocity singleton pattern or VelocityEngine? regards Malcolm Edgar On 2/4/06, e v a n [EMAIL PROTECTED] wrote: Hello, I just picked up on this thread[1

Re: OutOfMemoryException Processing Velocity Template

2006-02-06 Thread Nathan Bubna
: OutOfMemoryException Processing Velocity Template Are you using Velocity singleton pattern or VelocityEngine? regards Malcolm Edgar On 2/4/06, e v a n [EMAIL PROTECTED] wrote: Hello, I just picked up on this thread[1] from 5-10-2005 today because I'm running into a similar issue

RE: OutOfMemoryException Processing Velocity Template

2006-02-06 Thread e v a n
Subject: Re: OutOfMemoryException Processing Velocity Template that depends on which version of VelocityTools you are using. in 1.2, we rewrote things to use a VelocityEngine instead of the singleton, which was causing problems for us. On 2/6/06, e v a n [EMAIL PROTECTED] wrote: I believe that I'm

Re: OutOfMemoryException Processing Velocity Template

2006-02-06 Thread Nathan Bubna
: Nathan Bubna [mailto:[EMAIL PROTECTED] Sent: Monday, February 06, 2006 1:11 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template that depends on which version of VelocityTools you are using. in 1.2, we rewrote things to use a VelocityEngine instead

Re: OutOfMemoryException Processing Velocity Template

2006-02-06 Thread Malcolm Edgar
PROTECTED] Sent: Monday, February 06, 2006 1:11 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template that depends on which version of VelocityTools you are using. in 1.2, we rewrote things to use a VelocityEngine instead of the singleton, which

RE: OutOfMemoryException Processing Velocity Template

2006-02-04 Thread e v a n
need to be written out with Velocity. To anyone's knowledge, has anyone come up with such a patch? Thank You, Evan Leonard [1] - http://www.nabble.com/RE%3A-OutOfMemoryException-Processing-Velocity-Templat e-t5193.html [2] - http://www.nabble.com/Re:-OutOfMemoryException-Processing-Velocity

Re: OutOfMemoryException Processing Velocity Template

2006-02-04 Thread Malcolm Edgar
-OutOfMemoryException-Processing-Velocity-Templat e-t5193.html [2] - http://www.nabble.com/Re:-OutOfMemoryException-Processing-Velocity-Template- p23480.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: OutOfMemoryException Processing Velocity Template

2005-05-11 Thread Michael Salmon
to think of a use case where a user wants to scroll down 66K rows. WILL - Original Message - From: Mike Curwen [EMAIL PROTECTED] To: 'Velocity Users List' velocity-user@jakarta.apache.org Sent: Tuesday, May 10, 2005 5:09 PM Subject: RE: OutOfMemoryException Processing Velocity Template

Re: OutOfMemoryException Processing Velocity Template

2005-05-11 Thread lawrence
. WILL - Original Message - From: Mike Curwen [EMAIL PROTECTED] To: 'Velocity Users List' velocity-user@jakarta.apache.org Sent: Tuesday, May 10, 2005 5:09 PM Subject: RE: OutOfMemoryException Processing Velocity Template From way back in your first email: unless I set the tomcat JVM

Re: OutOfMemoryException Processing Velocity Template

2005-05-11 Thread Llewellyn Falco
Hey there, we also have a webapp with reports with lots of rows. We used to use a homegrown template parser, and recently switched to velocity for standards and tools, and on the whole i've been quite happy minus a few little issues, most which where solvable with the right convience classes.

Re: OutOfMemoryException Processing Velocity Template

2005-05-11 Thread Llewellyn Falco
Hey we've been using macro's to workaround complex setting issues. The problem is that if we use the global defaults, we can't overwrite the marco's and the concept of using them as a variable is lost, and if we turn it on props.put(velocimacro.context.localscope, + true); then the parsed file

Re: OutOfMemoryException Processing Velocity Template

2005-05-11 Thread Will Glass-Husain
PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org Sent: Wednesday, May 11, 2005 1:32 PM Subject: Re: OutOfMemoryException Processing Velocity Template Hey we've been using macro's to workaround complex setting issues. The problem is that if we use the global defaults, we can't overwrite

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread Ilkka Priha
PROTECTED] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge: 217393352 Free memory after merge: 16271392 so I would assume

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread lawrence
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge: 217393352 Free

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread Nathan Bubna
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge: 217393352

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread lawrence
To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge: 217393352 Free memory after merge: 16271392 so I would assume the StringWriter

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread Nathan Bubna
a FileWriter. David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread Nathan Bubna
: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge: 217393352 Free memory after merge: 16271392 so I would assume the StringWriter is approximately 200MB after

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread lawrence
PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread Nathan Bubna
:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread lawrence
] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory

RE: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread Mike Curwen
, but certainly for me and any apps I've ever written. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 6:21 PM To: Nathan Bubna Cc: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template *Gasp* Ok so I

Re: OutOfMemoryException Processing Velocity Template

2005-05-10 Thread Will Glass-Husain
of a use case where a user wants to scroll down 66K rows. WILL - Original Message - From: Mike Curwen [EMAIL PROTECTED] To: 'Velocity Users List' velocity-user@jakarta.apache.org Sent: Tuesday, May 10, 2005 5:09 PM Subject: RE: OutOfMemoryException Processing Velocity Template From way back

Re: OutOfMemoryException Processing Velocity Template

2005-05-09 Thread lawrence
] [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge: 217393352 Free memory after merge

Re: OutOfMemoryException Processing Velocity Template

2005-05-07 Thread Ilkka Priha
List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge: 217393352 Free memory after merge: 16271392 so I would assume the StringWriter is approximately 200MB after the merge. What should

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread jian chen
Well, I don't have a good clue now. What about do the debugging step by step, i.e., use just static html in your #foreach loop? Will that blow up the memory? Cheers, Jian On 5/5/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for the suggestion. I tried putting that, along with

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread lawrence
I tried putting static HTML in the #foreach loop, same problem. Then I tried setting the large list as a local varible: #set ($localList = $List) #foreach($row in $localList) ... but that didnt help either. I don't see why velocity should use 250+ MB of memory iterating over a list ~8MB in

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread lawrence
Ok, I think I've located the problem, although I can't think of a reasonable solution. Basically, if I make the #foreach loop EMPTY, it uses barely any memory: #foreach($row in $List) #end As I add more to the body of the #foreach: #foreach($row in $List) tr /tr #end The amount of memory

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread Ilkka Priha
What kind of writer are you using and how long are the items? 66 000 HTML table rows with 5 numeric columns consumes about 32 MB when buffered into a string writer. If the items are longer, it takes much more memory. -- Ilkka [EMAIL PROTECTED] wrote: I tried putting static HTML in the #foreach

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread lawrence
Sorry, I'm not sure what you mean by what kind of writer I'm using. Where would I find out? How would I change this (to maybe a StringBuffer writer?) Also, each column contains a String that is at most, 200 characters, most are closer to 10-20. There are a total of 10 columns. Thanks.

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread jian chen
Hi, I guess the writer Ilkka talked about is when using Velocity as a standalone template engine. Right now I don't have a good clue, could you run Velocity as a standalone template engine and render the page to see if there is a huge memory usage? Cheers, Jian On 5/6/05, [EMAIL PROTECTED]

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread lawrence
Alright, I ran this little piece of code: public static void main( String args[] ) throws Exception { /* first, we init the runtime engine. Defaults are fine. */ Velocity.init(); /* lets make a Context and put data into it */ VelocityContext context = new

RE: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread David You
Why do you use StringWriter? That is cached in the memory. How big is the StringWriter after the merge? David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:22 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread lawrence
: Re: OutOfMemoryException Processing Velocity Template Alright, I ran this little piece of code: public static void main( String args[] ) throws Exception { /* first, we init the runtime engine. Defaults are fine. */ Velocity.init(); /* lets make a Context

RE: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread David You
Well, Open a file, use a FileWriter. David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:48 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread lawrence
To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template I printed out the available memory before and after I call mergeTemplate: Free memory before merge: 217393352 Free memory after merge: 16271392 so I would assume the StringWriter is approximately 200MB

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread lawrence
1.4.2_04-b05). WILL - Original Message - From: [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org Sent: Friday, May 06, 2005 2:08 PM Subject: Re: OutOfMemoryException Processing Velocity Template Ok now I'm confused (suprise, suprise!). I looked

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread Will Glass-Husain
might also check out Hyades from the Eclipse project for an open source option. WILL - Original Message - From: [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org Sent: Friday, May 06, 2005 2:39 PM Subject: Re: OutOfMemoryException Processing Velocity Template

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread lawrence
the Eclipse project for an open source option. WILL - Original Message - From: [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org Sent: Friday, May 06, 2005 2:39 PM Subject: Re: OutOfMemoryException Processing Velocity Template This is why I'm so

Re: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread Will Glass-Husain
: Friday, May 06, 2005 3:45 PM Subject: Re: OutOfMemoryException Processing Velocity Template Ok I tried using JProfiler and used a StringWriter, and found that the item that was taking the most memory (150 MB) was. char[]! Ok now I'm completely stumped and clueless. -L On Fri, May 06, 2005 at 02:51

RE: OutOfMemoryException Processing Velocity Template

2005-05-06 Thread David You
PROTECTED] Sent: Friday, May 06, 2005 3:46 PM To: Velocity Users List Subject: Re: OutOfMemoryException Processing Velocity Template Ok I tried using JProfiler and used a StringWriter, and found that the item that was taking the most memory (150 MB) was. char[]! Ok now I'm completely stumped

Re: OutOfMemoryException Processing Velocity Template

2005-05-05 Thread jian chen
Hi, This maybe because you haven't turned on template caching. I had similar problem before, and even if I only used evaluate(...) method and load the template using my own java program, it happened when the for loop is lot of iterations. The bottom line for my problem is I need to turn on