MacBook Pro (Retina, 13-inch, Early 2015)

edited November 2016 in Using Processing

MacBook Pro (Retina, 13-inch, Early 2015) Processor 2.7 GHz Intel Core i5 Memory 8 GB 1867 MHz DDR3 Graphics Intel Iris Graphics 6100 1536 MB

Why would such a simple sketch

void setup() {
  size(1000, 625);
  pixelDensity(displayDensity());
}

void draw() {
  background(0);
  ellipse(1280/2, 800/2, 500, 500);

}

cause my fans to go off; and push the CPU so much

https://screenshot.click/17-11-lxvop-vlar8.jpg

Lore

Tagged:

Answers

  • I should of added this will start off and be at 80% plus from the start. Also I am running latest version of processing http://take.ms/4CFKe

  • edited November 2016

    Brainstorm:

    What does this print out in your console for displayDensity()?

    void setup() {
      size(1000, 625);
      // pixelDensity(displayDensity());
      println(displayDensity());
    }
    
    void draw() {
      background(0);
      ellipse(1280/2, 800/2, 500, 500);
    }
    

    Is it rendering at retina resolution or higher? Does the sketch also perform badly when not rendering at retina resolution, as with this example?

    If you drop to size(1000, 625) does the sketch still perform badly?

    Are you running many other programs while the sketch is running?

  • edited November 2016

    ---the println printed a "2" in the console from the code you shared above

    1] I am using this http://take.ms/hhDp4 for the mean time on a 13 inch rather than using the thunder display

    2] for now I decided to use the likes of

    void setup() {
      //fullScreen(); check fullScreen doc
      // 93.75% proportion of 1280,800
      size(1200, 750);
      pixelDensity(displayDensity());
    }
    
    void draw() {
      background(0);
      ellipse(width/2, height/2, width/3, width/3);
      point(243,253);
      line(272,1338, 602,413);
      rectMode(CENTER);
      rect(width/4, height/4, width/4, width/4);
    }
    

    http://take.ms/rkg73

    it is still chewing the processor http://take.ms/y44Ou

    3] I am baffled http://take.ms/b1eIW

  • Based on your final screenshot, it looks like you are getting high CPU time even without calling pixelDensity. The problem may simply be proportional to the number of pixels in your sketch surface.

    Is this also giving you high CPU time?

    void setup() {
      size(400, 400);
    }
    void draw() {
      background(0);
      ellipse(width/2, height/2, width/3, width/3);
    }
    
  • I have the the same issue, but my macbook is older. MacBook Pro (15-inch, Early 2011)

    I thought I was doing something to cause memory leaks in the sketch I was working on, but I was surprised that even just running the simple sketch at the top of this thread caused such high cpu drain.

    Is this a processing bug perhaps? Did you ever find a solution?

    Screen Shot 2016-11-24 at 23.53.37

Sign In or Register to comment.