Forums > Javascript

js gets slower and slower

November 29, 2012 | 4:41 pm

hi,
i have a js that creates one render object and sketch object with drawing some triangles in opengl. these are scaling up and down over the time. at startup everything works fine but after some minutes the fps going down and down from 50 to 30 and less. the render gets banged after the drawing command. have anybody a suggestion where the problem is? can it be a memory leg, because calculate the new vertex position is done each time the drawing command is called which is metro 50.

thanks


December 3, 2012 | 1:39 pm

Make sure you send your gl.sketch object reset and flush messages. If you don’t, the render queue just gets longer and longer and you’ll see performance go down. It’s not actually a JS problem, it’s a GL issue that is being improperly handled.

In my experience this is the first thing to check.


December 4, 2012 | 7:35 pm

that is not the problem, i reset the sketch object befor each drawing, to clear the command list.
i figured out that is a strange behavior between max5 and max6. in max5 it runs like expected and in max6 it runs in an memory leak.
i rebuild the script now and test each function furthermore i will switch to java and write it as an external.
thanks for your pointing on the reset message.


December 4, 2012 | 7:53 pm

make sure you update to the latest version of max 6. (.0.8).
we recently fixed a memory leak with opengl.


December 5, 2012 | 11:11 am

I updatet max, but the memory leak is still there. :(
I think rebuild from scratch is the solution, if i figured the leak out, i will post it here.


Viewing 5 posts - 1 through 5 (of 5 total)