Performance Issues when Scale isn't 1.0
swpalmer at gmail.com
Fri Sep 21 11:12:34 PDT 2012
Yes, that is correct, even when the zoom results in less being drawn performance drops.
It so happens that I had a go at making this into a Stage-based "pure" JavaFX application. I hand
t tried that code in a while, as there is a lot more to do to migrate the entire app, but what we have in our JFXPanel is mostly functional.
Here's the bad news. Performance in the Stage based app is even worse! I use CTRL+MOUSE_WHEEL for zoom. In the JFXPanel version the zoom is relatively smooth (we actually animate it a bit via JavaFX to go from one zoom level to another). In JavaFX I see the zoom happen at about 1 frame per second!. Dragging the components is at least as bad as with a JFXPanel, but I'm pretty sure it is worse. I don't quite get how that can be.
I'm going to do more investigation, as I now suspect an interaction with the scroll pane. The JFX GUI also has two versions of the document that are always zoomed out and not part of the scroll pane - basically to give a birds-eye view of the entire document. They don't seem to have any effect on the performance.
On 2012-09-21, at 1:05 PM, Brent Christian <brent.christian at oracle.com> wrote:
> Hi, Scott
> I'm not aware of any performance issues specific to scaling.
> You say the problem happens when you zoom in *or* out, so I assume it's not simply a matter of increased complexity in the visible portion of the graph.
> I would be interested to know if performance is different with the UML diagram placed in a Stage instead of a JFXPanel.
> I'm guessing a new JIRA will need to be filed.
> On 9/21/12 7:51 AM, Scott Palmer wrote:
>> I've searched Jira and didn't find anything. Is there a known issue with scaling causing significant performance degradation?
>> I have an application that renders something like a UML diagram in a JFXPanel. Basically it looks like a bunch of rectangles connect by lines. I can grab and drag those rectangles to layout the document, which can be rather large. I can also drag new connections between the boxes. This all works smoothly, until I try to "zoom" in or out on the diagram.
>> If I set a single X & Y scale factor on the parent node of my diagram so that I can see more of it (it's in a scrollpane too), that makes the performance plummet when I drag the boxes or try to drag a new Path to make a connection. It's at least 5 times slower I figure. The user experience is horrible as I get less than 5 fps at times vs. 30+ with the scale set to 1.0
>> I know there is ongoing work with performance, I just wondered if this is a known issue in 2.2.0 (Jira #?). I would file a bug, but it would take a while to isolate a test case from my current app.
More information about the openjfx-dev