[Java2D] slower on macs?

Java seems to be a lot slower on the mac OS, or at least when I use Java2D with it. Is this normal? or just the computer?
A game I made awhile ago, called Mineblock, ran perfectly on my laptop (with windows). When that computer broke, I continued to develop it on my dads computer, a 27 inch mac desktop[3.3 GHz quad core processor] (with much better hardware than my laptop [2.13 GHz dual core processor]), however the frame rate in it was MUCH slower.

One of the negative parts of Java2D is that you never know what performance you’re going to get.

As far as I know, applets use some offscreen rendering through a compositing layer in OSX, maybe someone can explain it better. Does your game work faster as an application?

It’s about the same as both an applet and an application.

Have you tried doing System.setProperty(“sun.java2d.opengl”,“true”);?

There doesn’t seem to be a difference in speed when I do that.

Could you please change the topic title to:
“Java2D seems to be a lot slower on macs?”

That would be a more accurate description of your problem :slight_smile:

Also begs the question: is this the old Apple JDK or is it the new Oracle JDK 7 Mac release?

Although the Oracle version seems to have most of the stuff from the old Apple JDK ported over.

New one. It’s also slow with just a plain install of Java (not the jdk).

I would post a reproducer.

In my experience, Java 2D on my MacBook Pro (circa 2010) is acceptably fast. I can paint approximately 3-4000 small bitmaps at 60 FPS without difficulties. lwjgl has even better performance but just to give you a ballpark…