Thanks for all the information.

It seems that I am less sure now that I have a memory leak.

I made a wrong diagnosis for the empty example that I showed above. It
actually works. And delete does its job.

But the GC does not indeed trigger straight away.

I wrongly assumed that because memory was going up and up, it would
eventually crash as in my first experiments.

Now, I know a bit more.

I will now go back to the drawing board, and check that I indeed have
a memory leak (the problem that I experimented in the first place
might have been related simply to an overload of the server, asking
too many things).

I'll let you know if I find a memory leak again :

Thanks again. This info was very valuable: "BTW, you should be aware
that Spidermonkey has a garbage collector which
is called when it reach a defined amount of memory".



On 23 jan, 22:41, Anthony Catel <[email protected]> wrote:
> PS:
>
> You can also update the server with the support of JaegerMonkey +
> MooTools 1.3 :https://github.com/APE-Project/APE_Server/tree/jaegerape
>
> Le 23/01/11 23:40, Anthony Catel a crit :
>
> > Hi,
>
> > What version of APE are you using?
>
> > BTW, you should be aware that Spidermonkey has a garbage collector
> > which is called when it reach a defined amount of memory :
> >https://developer.mozilla.org/en/JS_NewRuntime
>
> > You can tune this value here :
> >https://github.com/APE-Project/APE_Server/blob/master/modules/libape-...
>
> > Try this setting : 8L * 1024L * 1024L and just rebuild the module
> > (make inside the module directory).
>
> > Thanks,
>
> > Anthony C.
>
> > Le 23/01/11 23:24, Nicolas a crit :
> >> Hi,
>
> >> Test loading my app on the server side, I realized that I had a big
> >> memory leak.
>
> >> Narrowing down the problem, I ended up load testing something really
> >> simple, with still a memory leak:
>
> >>                              var i_max=50000;
> >>                              mc=0;
> >>                              for (var i=1;i<=i_max;i++)
> >>                              {
> >>                                  matches[i]=new Test_Class("s",
> >> 1,mc,"local",0,0,1);
>
> >>                                  delete (matches[i]); // Never does
> >> anything... There does not seem to be any destructor in Mootools.
> >>                              }
>
> >> With the empty class Test_Class defined like this:
>
> >> Test_Class= new Class({
>
> >>     //Constructor
> >>     initialize: function(param1, param2, param3, )
> >>          {
>
> >>          }
> >> });
>
> >> The 50,000 iterations lead to a leak of 40 Mb, that is 0.8kB per new
> >> object of the class created.
> >> I have Mootools 1.2.4 on the server, with a compile from the git from
> >> the 16th of december.
>
> >> My questions are:
>
> >> 1) Do you think that the memory leak is related to SpiderMonkey or
> >> Mootools?
> >> 2) Do you think upgrading to Mootools 1.3 help? I have tried but
> >> failed to do so. For some reasons, I don't manage to make it work.
> >> 3) Can you reproduce the problem on you server? It should not take
> >> very long to copy the few lines above.
> >> 4) Are there any know memory leak left in Ape?
>
> >> Any help greatly appreciated.
>
> >> Thanks in advance.
>
> >> Nicolas.

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to