Plethora of JMEDesktops?

Would I take a serious performance hit if I were to create a bunch of JMEDesktops in a single scene…say 100 of them? :-p

I wasn't sure if multiple JMEDesktops add a consistent drop in performance or if it's primarily just having a JMEDesktop at all in the scene that causes the initial kick?


hey darkfrog, sorry but i don't have an answer just another question

how bad is the performance hit of using JMEDesktop?

Well, a JMEDesktop that does not receive any input causes the same work for the system as a Quad with a Texture - very low overhead. So using a JMEDesktop in a normal scene should not give any notable fps drop. Even a large number of them should not cause significant cpu/gpu load while inactive, except for the fillrate for those many textures of course. So the main problem regarding performance would be the large amount of system and video memory needed.

Drawing components on a JMEDesktop uses a significant bandwidth on the memory buses. So updating components (e.g. changing values, hover effect, moving frames) is quite slow and won't get faster unless someone tells me some really clever things I don't know :wink:

Processing input for a single JMEDesktop currently imposes as much overhead regarding creation and collection of little objects (e.g. events) as a normal AWT frame does: a LOT of garbage! This makes the app frequently lagging as the garbage collector kicks in. I'm going to try to improve that as soon as I find some time for it…

JMEDesktop does not handle input for multiple desktops correctly at this time. Additionally the garbage overhead is mutiplied by number of desktops - which would get really bad with hundreds of them…

Fazit: when using one JMEDesktop don't fear any actual performance loss while the components do change seldomly. Multiple JMEDesktop are actually not supported yet.

hehe, I actually saw last night some of the problems using multiple JMEDesktops as I made a cube of JMEDesktops to use for my menu system:

It looks pretty sad in its current state, but when you press a button on the menu (Substance L&F btw) it rotates the camera around to another side of the cube that shows the corresponding menu.  The main problem I’ve seen so far is that when I get to the other menu I have to press a button on that menu (which doesn’t do anything) and then press it again before the action actually occurs.  Sometimes it doesn’t do anything no matter how many times I press it.

Multiple JMEDesktops may not be supported currently, but it works at least to some extent. :slight_smile:

Irrisor, any guesstimate on how long it will be before you get a chance to fix support for multiple JMEDesktops?  I didn’t realize it would be a problem and my game is currently depending on that functionality.  If it will be past the end of this month then I’ll probably need to come up with a different idea for my menu.


If I got your menu idea right, you can click only one desktop at a time. As it's only input that causes problems with multiple desktop you can simply use separate input handlers for the desktops and disable the input handlers of the inaccessible desktops. This should work fine then (even with many desktops).

I don't know when I get to code support for multiple desktops - most likely when I need them myself… which could be more than two weeks…