Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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  
  Avoiding extremely slow debugging?  (Read 2696 times)
0 Members and 1 Guest are viewing this topic.
Offline LeoMaheo

Senior Newbie





« Posted 2007-08-26 17:20:41 »

Hi anyone,

I'm debugging my jMonkeyEngine 3d application and achieve perhaps
3 frames per second, sometimes 1/15 frames per second.

When I run the application with the debugger disabled, I achieve
perhaps 100 or 200 fps.

I'm new to Java. How do people debug Java games? It seems
impossible -- if I achieve a framerate of 1/15 fps now, then how
am I going to debug the application when it's become 100
times more complex than as of today.

Is there perhaps a way to tell the Java debugger to debug only
my own source, not the middleware I'm using?
(I mean perhaps in the same way as with the -ea flag that can
enable assertions in certain packages only.)

(I've built jMonkeyEngine and jME-Physics_2 *without* debugging information;
nevertheless, when I run my application with debugging enabled I achieve
the above-mentioned rather unbearably slow framerate.)

(The game is currently sometimes 1 sometimes 100 boxes that falls on
a floor, bounce, and then rest. My own game does almost nothing;
jMonkeyEngine and jME-Physics_2 do all rendering and physics
computations. 3 fps with 1 box; perhaps 1/15 fps with 100 boxes.
I intended to use > 100 objects, more complicated than boxes...)

(I'm using Netbeans M10, Java 1.6 and Linux (Ubuntu). My machine
is a dual core 2 GB ram.)

Kind regards, Magnus
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1 - Posted 2007-08-26 20:56:45 »

Which profiler are you using.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline broumbroum

Junior Duke





« Reply #2 - Posted 2007-08-26 23:07:58 »

this seems to be the normal behaviour of Netbeans with debugging, but if your code is enough to debug itself you'd be able to face the lack of speed encountered. Plus the Java core seems to have difficulties to run more than one applications at a time, since the JRE can be limited on virtual memory on some systems, especially with the Windows system. Mac OS X and greater have it integrated in the core structure, e.g. I notice huge perf gaps with the graphics vertical synch' between Win32 and MacOS X PPC.  Lips Sealed
Perhaps this can change if the Java is distributed as a "consumer JRE" ( read on java.sun.com blogs ) as it would be smaller and more compact.

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @ http://b23prodtm.webhop.info
on sf.net: /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline irrisor

Junior Duke





« Reply #3 - Posted 2007-08-27 08:30:25 »

With jdk1.5 and 1.6 I get a slowdown of 10% to a maximum of 40% with IDEA or Eclipse. This is for 'normal' applications and jME/jME Physics applications. If this really is a problem with Netbeans you should switch Undecided
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #4 - Posted 2007-08-27 11:18:31 »

-Xprof has minimum overhead and still allows the VM to inline methods (they'll disappear from the stats though)

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #5 - Posted 2007-08-27 11:39:40 »

-Xprof has minimum overhead and still allows the VM to inline methods (they'll disappear from the stats though)

Yes, if -Xprof works at all. I found that it doesn't work anymore in Java6 for Swing applications (it simply hangs the app).
That said, I think the OP has problems debugging, not profiling.

Offline ryanm

Senior Duke


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #6 - Posted 2007-08-27 14:37:46 »

it doesn't work anymore in Java6 for Swing applications (it simply hangs the app).

Really? Who the hell is in charge of -Xprof at Sun?
As I understand it, it worked well in 1.4, was slow enough to be effectively useless in 1.5 and now is non-functional in 1.6?

To put it mildly, WTF?
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #7 - Posted 2007-08-27 17:04:20 »

Really? Who the hell is in charge of -Xprof at Sun?
As I understand it, it worked well in 1.4, was slow enough to be effectively useless in 1.5 and now is non-functional in 1.6?

To put it mildly, WTF?

Well, it works as long as the application isn't a swing app for whatever reason Undecided
Quite frustrating, really, but at least it seems to work better on 1.6 than it did in 1.5, *if* it works.

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 816
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #8 - Posted 2007-08-27 17:07:25 »

The app doesn't simply hang Wink I waited once, and it just ran about 700 times slower than normal Grin

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #9 - Posted 2007-08-27 17:24:03 »

The app doesn't simply hang Wink I waited once, and it just ran about 700 times slower than normal Grin

Hanging, running 700 times slower... Same difference to me  Smiley
It is strange though that somehow Swing is triggering this...

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline LeoMaheo

Senior Newbie





« Reply #10 - Posted 2007-08-31 00:36:19 »

Hi all,

I think it seems to be an IDE issue, as `irrisor' suggested. Sometimes the Netbeans 6 beta version Milestone 10 debugger runs extremely slowly, sometimes as quickly as one would expect it to do. Recently it started to run so very slowly when I modified the source code of a program and rebuilt it although one instance of it was running, and then I started a new instance (whilst the old was still running). This time however it was a Swing application; after this, Swing run extemely slowly (when debugging) until after a restart of Neteans 6 M10.

So, right now I feel I need not have posted about this. Thanks however for all answers :-)

( Hmm, if someone wants to, perhaps it could be appropriate that this thread be renamed so it does not accidentally cause anyone to believe that debugging Java apps is something inherently slow. I don't know, perhaps append "not an issue" or "irrelevant" or "solved" to the title? )

( I choose Netbeans 6 beta version because I thought I wanted to use it's Ruby support but I haven't used Ruby at all and I guess I should've choosen a stable release instead :-/  )


> if your code is enough to debug itself you'd be able to face the lack of speed encountered

I hope I'll write lots of unit tests :-)


> Which profiler are you using.

The Neteans 6 Milestone 10 debugger; I haven't used the profiler.


Thanks,
Magnus
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.

Longarmx (41 views)
2014-10-17 03:59:02

Norakomi (33 views)
2014-10-16 15:22:06

Norakomi (26 views)
2014-10-16 15:20:20

lcass (30 views)
2014-10-15 16:18:58

TehJavaDev (59 views)
2014-10-14 00:39:48

TehJavaDev (60 views)
2014-10-14 00:35:47

TehJavaDev (50 views)
2014-10-14 00:32:37

BurntPizza (66 views)
2014-10-11 23:24:42

BurntPizza (38 views)
2014-10-11 23:10:45

BurntPizza (80 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!