Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 4852 times)
0 Members and 1 Guest are viewing this topic.
Offline Bananabert

Junior Newbie

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


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
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
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 17:17:08 »

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

Lethal Running - a RPG about a deadly game show held in a futuristic dystopian society.
Offline Riven

« JGO Overlord »

Medals: 1340
Projects: 4
Exp: 16 years

Hand over your head.

« Reply #2 - Posted 2013-05-24 17: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 17: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 18: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 Devvie

« Reply #5 - Posted 2013-05-25 02: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 14: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: 28
Projects: 3
Exp: 5 years

« Reply #7 - Posted 2013-05-27 01: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  

EgonOlsen (73 views)
2018-06-10 19:43:48

EgonOlsen (54 views)
2018-06-10 19:43:44

EgonOlsen (73 views)
2018-06-10 19:43:20

DesertCoockie (253 views)
2018-05-13 18:23:11

nelsongames (154 views)
2018-04-24 18:15:36

nelsongames (153 views)
2018-04-24 18:14:32

ivj94 (895 views)
2018-03-24 14:47:39

ivj94 (156 views)
2018-03-24 14:46:31

ivj94 (807 views)
2018-03-24 14:43:53

Solater (171 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!