This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
At the docs it says
This variable can be used to alter the location of a node without disturbing its layoutBounds, which makes it useful for animating a node's location.
"Animate" should mean that you call it once every frame, right?
Here is some short example code to demonstrate what I'm talking about:
https://gist.github.com/ChristophHaag/661be992429b451218e9ee1fb0eacdec
and the important part is
imv.setTranslateX(imv.getTranslateX() deltax);
imv.setTranslateY(imv.getTranslateY() deltay);
imv.setRotate(imv.getRotate() 1);
inside the AnimationTimer.
If I run this program with openjdk8 or oracle jdk 8 on Linux, it will eat Gigabyte after Gigabyte of memory and consume a massive amount of CPU resources.
jvisualvm doesn't work for this because it doesn't support java 8 lambdas, but the netbeans profiler has a workaround for that. I tried looking in there, but as far as I can see all that time is spent in some X11 GLES code: https://i.imgur.com/KqZU91l.png
Is this just a platform issue? Can someone on Windows or something like that test it and report back?
Post Details
- Posted
- 8 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/JavaFX/comm...