# Better grid Performance

**URL:** <https://discourse.processing.org/t/better-grid-performance/7314>\
**Category:** Coding Questions\
**Created:** [January 8, 2019, 11:50am UTC](https://discourse.processing.org/t/better-grid-performance/7314 "2019-01-08T11:50:46Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [January 8, 2019, 2:26pm UTC](https://discourse.processing.org/t/better-grid-performance/7314/9 "2019-01-08T14:26:56Z")

</div>

> [@blue-man](#):
>
> I saw your code and I understood how it worked

now actually i doubt that you run my  
example from

> [@\[SOLVED\] Scalable grid with rectangles](https://discourse.processing.org/t/solved-scalable-grid-with-rectangles/7256/6):
>
> the math is still the same, if you draw a grid of rect OR setup your own array of rectangles from class
> 
> > **example**
> >
> > // https://discourse.processing.org/t/scalable-grid-with-rectangles/7256 int x = 20, y = x, w = 0, h = w; int grid = 8, many = grid\*grid; Myrect[] myrects= new Myrect[many]; void setup() { size(600, 400); // use x,y,grid as master and auto adjust rectangles (w,h) to window: w = ( width - 2 \* x ) / grid; h = ( height - 2 \* y ) / grid; for (int i = 0; i \< many; i++) m…

need to click on the

> **example**
>
> to see the code

---

_[View the full topic](https://discourse.processing.org/t/better-grid-performance/7314)._
