Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Java 7 runs slower ?  (Read 1959 times)
0 Members and 1 Guest are viewing this topic.
Offline Bananabert

Junior Newbie





« Posted 2013-05-24 18:43:08 »

Hey,

sorry for bad english.

i just moved on to java 7 and noticed huge performance issues.

i really don't know what to do >.<

its the same code and java 6 runs 20-30 times faster than java 7.

made a trace log

java 7
1  
2  
3  
4  
5  
6  
282 calls to sun.java2d.opengl.OGLSwToSurfaceBlit::Blit(IntRgb, AnyAlpha, "OpenGL Surface")
282 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcOverNoEa, IntRgb)
282 calls to sun.java2d.loops.DrawGlyphList::DrawGlyphList(AnyColor, SrcNoEa, AnyInt)
1 call to sun.java2d.opengl.OGLRTTSurfaceToSurfaceBlit::Blit("OpenGL Surface (render-to-texture)", AnyAlpha, "OpenGL Surface")
4 calls to sun.java2d.loops.FillRect::FillRect(AnyColor, SrcNoEa, AnyInt)
1 call to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)


java 6
1  
2  
3  
4  
5  
33621 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntArgbPre)
33626 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
33627 calls to sun.java2d.loops.DrawGlyphListAA::DrawGlyphListAA(AnyColor, SrcNoEa, IntRgb)
100881 total calls to 3 different primitives
852 total calls to 6 different primitives


same options same vm options .. i don't really get it

greetings bert.
Offline 65K
« Reply #1 - Posted 2013-05-24 19:17:08 »

What are those trace logs supposed to mean ?
What and how did you measure ?
In any case, no, its not slower.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 743
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2013-05-24 19:39:35 »

As this is Java2D, any version can have arbitrary performance on any machine.

A performance difference of factor 30x is not that unusual. It means that the Java2D backend picked the 'wrong' renderer (either software, directx, opengl).

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Bananabert

Junior Newbie





« Reply #3 - Posted 2013-05-24 19:59:44 »

thanks so far Smiley

ah okay, is there anyway to force it to use a specific? if yes, is there a way to get the one jre 6 is using?

or is it time to use lwjgl?
tried it a few times, but i dont really get it :/
Offline Z-Man
« Reply #4 - Posted 2013-05-24 20:01:28 »

Basically, don't use Java2D. I used it for a while because it always did what I needed to do, but as soon as I tested my game on Ubuntu the performance dropped to an unplayable level. I discovered Java2D was the culprit and moved on to LWJGL. Haven't looked back since Grin
Offline concerto49

Junior Member





« Reply #5 - Posted 2013-05-25 04:33:40 »

JavaFX isn't bad either. It's meant to be a Swing / Java2D replacement. Java2D is ancient.

High performance, fast network, affordable price VPS - Cloud Shards
Available in Texas, New York & Los Angeles
Need a VPS Upgrade?
Offline davedes
« Reply #6 - Posted 2013-05-26 16:57:27 »

LWJGL is very "low level" and not necessarily a good replacement for Java2D. Simple tasks like rendering an image or drawing shapes will seem rather daunting and complex.

A better solution is to use a library built on OpenGL rendering, like LibGDX.

Offline wreed12345

JGO Knight


Medals: 24
Projects: 2
Exp: 2 years


http://linebylinecoding.blogspot.com/


« Reply #7 - Posted 2013-05-27 03:36:59 »

Only thing to watch out for in libgdx is im pretty sure its 3d stuff is relatively new and constantly being changed / improved - but i still would def try it Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (26 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (20 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (57 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!