Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By gimbal2

Thread: java2D performance very bad on mac-os-x

  1. #1
    dalo is offline Member
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Default java2D performance very bad on mac-os-x

    Hi !
    I am working on a java application that is drawing a lot on a jpanel.
    It is using Java 2D api.
    The performance is very good on windows and linux, but it is very bad on max-os-x.
    The platform is: mac os x - 10.6.8 ; java - 1.7.0_21 (64 bit).

    I have tried to include the following statement at the beginning of the main() method:
    Java Code:
     System.setProperty("apple.awt.graphics.UseQuartz","true");
    But there is no result. The application is equally slow with and without this statement.
    I remember that this statement used to improve the performance a lot - two years ago
    (I don't remember what was the java-version then).

    Is there any other way to improve java2d graphics performance on mac os x ?

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    4,104
    Rep Power
    6

    Default Re: java2D performance very bad on mac-os-x

    The joke is that your application is running good on windows and linux... on YOUR computer(s). Not necessarily on that of your neighbor. Java2D really is no good for performance-heavy drawing stuff, the results are really system-dependent.

    You're using Java 7, so its actually the Oracle runtime. That apple property won't work on it since it is for the old Apple runtime, which is Java 6 and below. You might play with turning OpenGL on and off using System.setProperty("sun.java2d.opengl","true"), but probably it will boil down to figuring out what the renderer used under MacOS doesn't like by turning on the Java2D debugging and finding a way to improve that. Here is the page that lists the different properties to set for Java2D:

    System Properties for Java 2D(TM) Technology
    DarrylBurke likes this.

  3. #3
    dalo is offline Member
    Join Date
    Jun 2010
    Posts
    3
    Rep Power
    0

    Default Re: java2D performance very bad on mac-os-x

    Thank you for your suggestions !
    My application is not very performance demanding and it seems to me
    that it does run well on low performance computers – on windows and linux.
    Recently I found out that it runs well also on mac-os + java-6.
    But there is still the same problem on mac-os + java-7 (slow performance).
    Yes, I agree with you, I should figure out what the renderer under mac-os doesn't like.

    Thanks!

Similar Threads

  1. problems with java2D
    By PRW56 in forum New To Java
    Replies: 6
    Last Post: 05-30-2012, 01:05 AM
  2. the very very very basics of java2d
    By senca in forum New To Java
    Replies: 1
    Last Post: 11-24-2010, 03:30 PM
  3. Java2D Co-Ordinate Rounding
    By Gemma in forum Java 2D
    Replies: 0
    Last Post: 04-17-2010, 11:52 AM
  4. Java2D
    By Alex j in forum Java 2D
    Replies: 1
    Last Post: 04-07-2009, 04:59 PM
  5. n00b help with java2D api
    By michcio in forum Java 2D
    Replies: 7
    Last Post: 10-30-2008, 06:18 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •