# P5.js sketches with terrible framerate on chrome

**URL:** <https://discourse.processing.org/t/p5-js-sketches-with-terrible-framerate-on-chrome/499>\
**Category:** Coding Questions\
**Created:** [May 29, 2018, 4:56pm UTC](https://discourse.processing.org/t/p5-js-sketches-with-terrible-framerate-on-chrome/499 "2018-05-29T16:56:33Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![colin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/colin/32/230_2.png) [@colin](https://discourse.processing.org/u/colin)\
**Post date:** [May 29, 2018, 4:56pm UTC](https://discourse.processing.org/t/p5-js-sketches-with-terrible-framerate-on-chrome/499/1 "2018-05-29T16:56:33Z")

</div>

Hi, I developed several games using P5.js and I managed to make them work around 60fps. Sadly, I discovered that they’re working around 10fps on a lot of browsers including recent versions of chrome and safari.

Here is a very short sketch that display framerate.

[http://pleaseletme.help/framerate/](http://pleaseletme.help/framerate/)

Any idea of how to solve this issue ? I’m a bit lost.

here is the P5.js sketch

Thanks for our help !

I also posted this question [here](https://stackoverflow.com/questions/50584279/p5-js-sketch-has-terrible-framerate-on-chrome)

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

function windowResized() {
  resizeCanvas(windowWidth, windowHeight);
}

function draw() {
  background(255);
  textAlign(CENTER, CENTER);
  text(frameRate(), width / 2, height / 2);
}

body {
  padding: 0;
  margin: 0;
}

canvas {
  vertical-align: top;
}

```

---

_[View the full topic](https://discourse.processing.org/t/p5-js-sketches-with-terrible-framerate-on-chrome/499)._
