Thank you for your response, Sandro. I've not yet ordered a replacement for the RPi, so I think I'll try converting SVG to JPG and maybe (if I can get one) using a faster memory card. That seems like the easiest thing that is likely to work. (Question: Is rendering of SVG vs. JPG really that much more demanding?) I'll also try JConsole if I have time. But I think the real issue is just that the graphics are being handled by the RPi's CPU instead of the GPU. Raspbmc (a media server app for the RPi), is a good example of RPi graphics looking snazzy when it's properly configured.
Regarding JavaFX and RPi, check this: "Note that the default configuration of JavaFX on the Raspberry Pi does not use X11. Instead JavaFX works directly with the display framebuffer " ( https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi) Indeed, when I ran my Pivot app from command line, with no X server running, I got an error stating that an X server was not found. But with a JavaFX demo app, the app appeared on screen. Furthermore, when I started a JavaFX app over ssh, the output was rendered on the RPI's display, leading me to conclude that JavaFX does indeed work directly with the framebuffer, instead of through X. Regarding Wayland, my understanding is that it is a ground-up replacement for X, meaning that it should be way faster, but will need apps to be rewritten to use it. It also seems to take advantage of the RPi's GPU. Of course, Pivot running through Java 7 needs an X server. Luckily, there's XWayland, which purports to offer back-compatibility for apps that need X. I'm guessing Pivot-via-XWayland would be faster that the status quo because of using the GPU, but slower than slower than, say, a version of Java that uses Wayland directly, because of the X compatibility layer. (It would also probably be slower than JavaFX's direct-to-framebuffer approach.) But I wouldn't know because I couldn't get Wayland running on the RPi =) So, in answer to your question, I am using an RPi rev. B =D It has 512MB of RAM. I've got 256 of that dedicated to graphics. I might play with this number to see what happens. In any case, I'll let you all know how the progress goes. Cheers, --E On Sun, Aug 18, 2013 at 12:30 PM, Sandro Martini <[email protected]>wrote: > Hi Erik, sorry for the delay ... > > > I'm not a *nix guru, though I can follow guides and the basic concepts. > With > me too :-) ... > > Just for info, are you using the RPi with 256 or 512 MB of RAM ? What > model ? > > > that in mind, the only way I've figured out how to view a Pivot app on > the > > RPi is to see the graphics output from within the window manager (LXDM, > > after calling 'startx'). This means doing startx, then either going to > > another tty via, say, ctrl-alt-f2, or opening the run dialog in LXDM via > > alt-f2. From there, I call a script that launches the Pivot app. If in > tty, > > I go back to the window manager via ctrl-alt-f7. My current script, as an > > example, can be found here: > > > > https://gist.github.com/einnocent/6207649 > all seems ok, if you could open a Terminal/Console directly inside the > window manager it could be a little (but only little, I know) better > ... if you can, try to use less dependencies. > > On o different PC, try to attach to the running Java process in the > RPi from remote, using JConsole or better, JVisualVM (bundled in all > Java 7 JDKs). > > > > So the good news is that Pivot runs on the RPi. > great, thanks for reporting to us > > > The bad news? Things are unusably slow. > I really think (as many others over Internet) that it's probably due > to the little memory (and poor CPU processing power) of RPi, so any > Java GUI application on it won't be fast ... maybe with some > modularization of JRE (with Java 8 or 9 ?) things should be better > > > I'm doing mostly scaling and placement of SVGs within a > > panel, with maybe a dozen labels, so I'm guessing it's not my app doing > > anything crazy intensive. (Or am I wrong?) > try to not use SVG images, and even use small images if you can ... > Last, try if without using bxml files (setup GUI directly in code), if > something is better (but I don't thing this should reduce memory > footprint a lot) ... > > > > I've a few ideas for speeding things up, namely: > > > > Using JRE8 instead of JDK8. I don't expect this to yield big gains and > can't > > wait for the official release of Java 8 next year > > (http://openjdk.java.net/projects/jdk8/). > I agree with you > > > Using a faster memory card. I also don't expect much from this as I'm not > > doing much disk operation and I don't think I'm swapping out to the SD > a faster memory card could help, but try to check if/how much swap you > are using (and where the OS is writing the swap), and (if possible) > try to disable it (temporary), but attention !! > > > Using a faster computer, using Windows. More expensive and less elegant > I know, but of course with limited hardware (and Java memory > footprint) RPi is not well suited for some kind of applications ... > and Windows has always been the de facto standard for GUI applications > > Using a faster computer, using Linux. More expensive and I could have > similar issues > no, we have many users under Linux, here all is good ... otherwise > Java wouldn't make sense for us > > > Using JavaFX. I'd have to learn another framework, but then I could > avoid X, > > which I think is what's slowing things down (I think the graphics are > being > > handled by the CPU instead of the GPU). I don't know if JavaFX takes > > advantage of the GPU, but the dedicated link here > > (http://www.oracle.com/technetwork/java/javafx/overview/index.html) > seems to > > indicate some level of support. > yes, JavaFX uses GPU, but for whet I know, you always need X under, so > things should be the same even there. > I think that they use a lot Python (and some graphic library/GUI) for > it, this should require less memory than Java. > > > Using Weston/Wayland (http://wayland.freedesktop.org/raspberrypi.html). > > Getting Wayland running on the RPi has been a pain and I'm still not > there > > yet. I'm guessing it will be built into an upcoming release of Raspian, > but > > I can't wait for that. I also worry if it will even help, since the app > will > > be going through XWayland (http://wayland.freedesktop.org/xserver.html). > but is/will it be compatible with X ? and with Java ? could be interesting > ... > > > Using pivot-fx? I'd like to try this but the project > > (https://code.google.com/a/apache-extras.org/p/pivot-fx/) appears to be > > dormant. Anyone know what's going on with this? > I created that project many time ago, but due to lack of interest it's > still empty ... > > > > So, does anyone have any suggestions on how to speed things up? Any > input on > > my ideas? And does anyone know what's going on with pivot-fx? I'd really > > like to get a Pivot app running on the RPi, I think it would be really > cool =) > I hope my previous answers could give you some info ... if you need > more, tell to us > > > Thank you so much for your help! > thanks to you for your help, I hope we can improve Pivot on RPi (and > other minimal platforms) ... > > Anyway, tell us for news. > > Bye, > Sandro >
