1

I have an performance issue with P5.js when rendered in Chrome, but not other browsers. I get around 10-15 fps in Chrome, even when tested with a simple moving ellipse. I've tried restarting my computer, doing a clean install of Chrome, updating the libraries, but nothing worked. When performing, my CPU usage goes up quite a bit (2.5 Ghz i7) to around 50% usage. Chrome dev tools doesn't really help either, showing "program" being the culprit for CPU usage.

The weirdest thing is that a couple weeks ago, everything waas going smooth and no problem was ever encountered.

Thus I wondered if any of you guys ever had such an issue or knows what's going on. Thanks!

Edit: Here's the simple a simple testing code that runs very poorly on my machine.

function setup() {
    createCanvas(windowWidth,windowHeight);
    }

    let a = 0;
    let b = 0;

    function draw() {
       background(0);
       fill(255);
       ellipse(a,b,200);
       a += 1;
       b += 1;
    }
cegMo
  • 11
  • 2
  • Can you please post a [mcve] that demonstrates the problem? – Kevin Workman Apr 06 '18 at 18:57
  • Done, put it in my post. – cegMo Apr 06 '18 at 19:04
  • Sorry, but a link to a zip file is not a [mcve]. Please post the code directly in your post. Try to make it a simple example instead of your full program. – Kevin Workman Apr 06 '18 at 19:06
  • I ran your code in chrome and I get a reliable 60 FPS. – Kevin Workman Apr 06 '18 at 20:18
  • Then I don't know what to say. I find it very odd that it's so slow and so CPU heavy all of a sudden. Weirdly enough if I open the console and stretch it all the way (to cover the canvas) then the FPS goes up to 60 (canvas barely visible). I'm at a loss. – cegMo Apr 06 '18 at 23:38

0 Answers0