[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Jython memory inefficiency [Was: Re: [Gzz] 28th-29th (jvk)]
From: |
Janne Kujala |
Subject: |
Re: Jython memory inefficiency [Was: Re: [Gzz] 28th-29th (jvk)] |
Date: |
Thu, 31 Oct 2002 12:42:56 +0200 |
User-agent: |
Mutt/1.2.5i |
On Wed, Oct 30, 2002 at 07:23:16PM +0200, Tuomas Lukka wrote:
> > The code is executed 8 times for each of the key presses.
> >
> > When the thrashing begins, java process memory size grows from
> > about 180M to 930M. After that, I can press keys 6400 times
> > while memory size grows to about 1050M. Then, I get
> >
> > Out of Memory
> > You might want to try the -mx flag to increase heap size
> >
> > I'm using Sun's j2sdk1.4.1_01.
> >
> > Any ideas?
>
> Write that part of the code in Java? Jython isn't meant for that kind
> of heavy number / string crunching. It's a glue language.
That does not explain java using 8 times the specified heap size
(-Xmx128M) of memory.
The problem disappears if I add the following piece of code:
if 0:
texcoords += [ 1, 2, 3, 4 ]
texcoords += [ 1, 2, 3, 4 ]
texcoords += [ 1, 2, 3, 4 ]
texcoords += [ 1, 2, 3, 4 ]
texcoords += [ 1, 2, 3, 4 ]
texcoords += [ 1, 2, 3, 4 ]
...
texcoords += [ 1, 2, 3, 4 ]
where the "texcoords" line is repeated 93 times.
jvk