# Processing seemingly capped at 35% cpu

**URL:** <https://discourse.processing.org/t/processing-seemingly-capped-at-35-cpu/11872>\
**Category:** Processing\
**Created:** [June 5, 2019, 8:13pm UTC](https://discourse.processing.org/t/processing-seemingly-capped-at-35-cpu/11872 "2019-06-05T20:13:00Z")\
**Posts on this page:** 1\
**Showing post:** 17

<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:** [September 15, 2019, 3:47am UTC](https://discourse.processing.org/t/processing-seemingly-capped-at-35-cpu/11872/17 "2019-09-15T03:47:13Z")

</div>

even more bad news:

> it will not get better soon

with: canvas 800\*800 and 5000 of your ?items? ( i not read your code… )

> **MOD test code**
>
> ```auto
> ArrayList<Female> females = new ArrayList<Female>();
> boolean diagp=false; //true;
> int many = 5000;
> 
> void setup() {
> size(800,800);
> frameRate(120);
> for (int i = 0; i < many; i++) {
> PVector location = new PVector(height/2, width/2);
> int[] colours = {floor(random(255)), floor(random(255)), floor(random(255))};
> Female newFem = new Female(location, "female", 1, colours, 16, 10, 10, 10, 10, 50);
> for (int x = 0; x < newFem.moves.length; x++) {
> newFem.moves[x] = new PVector(random(-0.5, 0.5), random(-0.5, 0.5));
> }
> females.add(newFem);
> }
> noStroke();
> }
> void draw() {
> background(255);
> for (int i = 0; i < females.size()-1; i++) {
> females.get(i).move();
> females.get(i).display();
> }
> if ( frameCount%100 == 0 ) println("fps: "+ frameRate );
> }
> 
> //Breeder entity object
> 
> class Ent {
> ////Abstract properties
> int id;
> int age;
> //'male' or 'female'
> String gender;
> //PVectors
> PVector location;
> PVector velocity = new PVector();
> //n pixels per frame
> float speed;
> 
> ////Physical properties
> //0-255
> int[] colour;
> //4, 8, 16
> int size;
> 
> ////Combat properties
> float hp;
> float damage;
> float b_velocity;
> float f_rate;
> 
> ////Hunger
> boolean hungry = false;
> int hunger = 0;
> int hungermax;
> 
> Ent(PVector location_, String gender_, float speed_, int[] colour_, int size_, float hp_, float damage_, float b_velocity_, float f_rate_) {
> id = floor(random(10000000, 99999999));
> location = location_;
> gender = gender_;
> speed = speed_;
> colour = colour_;
> size = size_;
> hp = hp_;
> damage = damage_;
> b_velocity = b_velocity_;
> f_rate = f_rate_;
> }
> 
> Ent() {
> }
> 
> //void move(){    
> // location.add(velocity.x * speed, velocity.y * speed);
> //} 
> //Draw Ent on step
> void display() {
> fill(colour[0], colour[1], colour[2]);
> //Wall wrap
> if (location.y > height) {
> location.y = 0.00;
> if (diagp) println("more than height");
> }
> if (location.y < 0) {
> location.y = height;
> if (diagp) println("less than height");
> }
> if (location.x > width) {
> location.x = 0.00;
> }
> if (location.x < 0) {
> location.x = width;
> }
> rect(location.x, location.y, size, size, 5.00);
> }
> }
> 
> class Female extends Ent {
> 
> boolean pregnant = false;
> int gestation = 0;
> int gestperiod;
> PVector[] moves = new PVector[90];
> 
> int food;
> ////Movement
> //increment 
> int stepcount = 0;
> //change direction when stepcount is a modulus of stepchange
> int stepchange;
> //which move is it up to
> int movenumber = 0;
> 
> Female(PVector location_, String gender_, float speed_, int[] colour_, int size_, float hp_, float damage_, float b_velocity_, float f_rate_, int gestperiod_) {
> super(location_, gender_, speed_, colour_, size_, hp_, damage_, b_velocity_, f_rate_);
> gestperiod = gestperiod_;
> stepchange = floor(random(50, 100));
> }
> 
> void move() {
> if (stepcount % stepchange == 0) {
> velocity.set(moves[movenumber]);
> if (diagp) println(moves[movenumber].x);
> if (diagp) println(velocity);
> if (diagp) println(stepchange);
> movenumber++;
> if (movenumber == 90) {
> movenumber = 0;
> }
> }
> location.add(velocity);
> stepcount++;
> }
> }
> 
> ```

our usual JAVA 8 Processing 3.5.3

 ![cpu_usage_processing353_newPC](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/c03ad5b6eb1371e79a234f3da43cb710e86b4514.png)

and now i try the JAVA11 version ( possible Processing 4.0.0 beta ) @sampottinger

 ![cpu_usage_processing400b_newPC](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/cedfb624d3b15b3aa71496364f58df1951eee8cf.png)

and same ( or even less ) FPS  
and i hoped it might be more ?efficient?  
( i not understand why the GPU usage value changed / 12% to 36% / )

so:

> processing is cooking on one burner?

---

_[View the full topic](https://discourse.processing.org/t/processing-seemingly-capped-at-35-cpu/11872)._
