# Framerate going down unexpectedly

**URL:** <https://discourse.processing.org/t/framerate-going-down-unexpectedly/16400>\
**Category:** Processing\
**Created:** [December 14, 2019, 5:20pm UTC](https://discourse.processing.org/t/framerate-going-down-unexpectedly/16400 "2019-12-14T17:20:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [December 14, 2019, 6:16pm UTC](https://discourse.processing.org/t/framerate-going-down-unexpectedly/16400/2 "2019-12-14T18:16:31Z")

</div>

Hello,

I tried it with this:

> **[daneden/processing-flow-field](https://github.com/daneden/processing-flow-field)**
>
> Contribute to daneden/processing-flow-field development by creating an account on GitHub.

And modified:

```auto
int noOfPoints = 250;

```

```auto
void draw() {
  surface.setTitle("FrameRate: " + frameRate); //Set the frame title to the frame rate`

```

```auto
  public void show() {
    stroke(255, 50);
    strokeWeight(2);
    point(pos.x, pos.y);
    fill(155, 0, 0);
    float tmp2 = map(pos.x, 0, width, 5, 20);
    //println(pos.x);
    //println(frameRate);
    textSize(int(tmp2));
    text("X", pos.x, pos.y);
  }

```

I cast the textSize to an int and frame rates were 60 fps.  
Otherwise, they slowed down significantly; you can try this.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/bc2e77f182ccf659cc0604b3f6793d3eccde3ad0.jpeg)

[https://processing.org/reference/textSize\_.html](https://processing.org/reference/textSize_.html)  
accepts floats but also state that textSize is in units of pixels so casting to an int would provide pixel sizes.

🙂

---

_[View the full topic](https://discourse.processing.org/t/framerate-going-down-unexpectedly/16400)._
