Huge Slowdown on Sketches with Type using Mac OS High Sierra

edited May 2018 in Using Processing

Half of the students in my Processing class are using brand new Mac Pro Laptops with High Sierra, the other half are on El Capitan. The students on High Sierra are experiencing a HUGE delay on anything that has text.

Even if it's only a five or six line sketch containing a single word. Literally about 20 seconds before anything appears on the screen. Strange. Any ideas?

Tagged:

Answers

  • Can you post a ticket in github and cross-linked here please? Also, are you using P3D renderer?

    Kf

  • edited May 2018

    I tried the following sketch and it took 3-5 seconds for all three renderers (JAVA2D, P2D and P3D). This was using PS 3.3.7 and High Sierra on a 8 year old iMac.

    What time do you get?

    String s = "Quark likes cheese";
    
    void setup() {
      size(800, 600, P3D);
      textSize(20);
      textAlign(CENTER, CENTER);
    }
    
    void draw() {
      background(255);
      fill(0);
      text(s, 0, 0, width, height);
    }
    
  • 2.5 second startup on a recent machine with macOS 10.12.6 -- average first frame is 2690 milliseconds.

    By "Sketches with type" do you mean generating fonts? Is this any font, or one specific font?

  • Sorry for the delay! Needed to get the info from my students and they are super busy this time of year. Here is our string:

    Can you all look at this thread and try the test they suggest? https://forum.processing.org/two/discussion/comment/123644#Comment_123644

    try it with: size(800, 600, P3D); and with just: size(800, 600);

    and count the seconds it takes for it to start up and let me know so I can respond and we can get to the bottom of this!

    --------- response 1

    I just tried both these sets of code. The first one takes roughly between 4-5 seconds whereas the second takes about 2 seconds.

    --------- response 2

    Took way longer for me— first one took 7 seconds, the second 4 seconds. This was after I restarted, before that it took more like 9 sec. and 7 sec.

  • What text? The link you provide is for this discussion :(

  • edited May 2018

    I was sharing the link to this thread with my students so they could test the exact code you provided quark:

    String s = "Quark likes cheese";
    
    void setup() {
      size(800, 600, P3D);
      textSize(20);
      textAlign(CENTER, CENTER);
    }
    
    void draw() {
      background(255);
      fill(0);
      text(s, 0, 0, width, height);
    }
    
  • I was baffled because to access the link above you must already be on this page.

  • Yes, sorry, I was just summarizing the emails. My bad. Any ideas based on their responses?

    Seems to me that having to wait more than a second or two is very problematic from an efficiency stand point. Especially considering this is just a tiny script.

  • In both cases it took longer when using the P3D (OpenGL) renderer than it did with the standard Java AWT renderer.

    This is not surprising because it will take longer for OpenGL to initialise because of its complexity compared with Java AWT. The size of the script will have no impact on the time to initialise the renderer.

    From the users perspective waiting several seconds might seem unacceptable for a tiny Processing script to execute but perfectly acceptable for a large Processing script. In both cases the efficiency is the same.

    There are many factors that can affect the start up time including

    • CPU type and speed
    • amount of RAM
    • Operating system and its version
    • GPU processor, speed, memory etc.
    • OpenGL drivers (version)
    • Java version
    • ...

    From a students perspective it probably seems worse because the code-run-code-run... cycle is very quick so any delay in executing the script can be annoying.

  • Thanks quark! We had not been using P3D in class when we had the initial issue so I'm not sure why in those cases the slowdown was so extreme.

    Though I imagine it had to do with loading typefaces and using PFont. In those cases the wait was more like 20+ seconds for the students in question while on my computer the same script loaded instantly.

    I've encouraged the students to join this forum and take the baton from here should they want to explore this issue further.

    As I initially speculated I believe it is the OS that is causing the issues given the fact that, of all the students with brand new mac pro laptops, only the ones who had updated to High Sierra were having the long delay.

    If anyone reading this thread has any more info about this I would be excited to hear your thoughts.

    Thanks again quark for all of your time! Really appreciate it.

    • Jason
Sign In or Register to comment.