Firefox - frameRate get slower and slower over time

edited March 2016 in p5.js

I am using the latest version of FF. The framerate degrades continuously over time, even when doing no drawing. Chrome seems to be ok. Not tried other browsers yet. Anything I am missing here? Is there some periodic clean up I am supposed to do? Or is it just a FF leak? Eventually if becomes unusably slow.

    var totalFrames;

    function setup ()
    {
        totalFrames = 0;
    }

    function draw ()
    {
        totalFrames += getFrameRate();

        var mean = (totalFrames / frameCount).toFixed(2);
        var curr = getFrameRate().toFixed(2);

        console.log ("mean: " + mean + ", current: " + curr);
    }

Answers

  • Answer ✓

    At first glance it looks like there's a memory leak that doesn't get cleaned up by Firefox...

    But this may have nothing to do with p5js and everything to do with your use of console.log()... Remove that from your code and Firefox appears to manage memory usage just fine. With console.log in place it starts eating it up at an alarming rate...

  • Thanks for this. In general seems that FF canvas is leaky and creaky. Lets hope they address it in updates.

Sign In or Register to comment.