Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Performance problems with large number of nodes

2909130Mar 22 2015 — edited Mar 24 2015

I am creating an application to display (large) graphs, for example:

graph.png

But I have run into some performance problems, even for a fairly low number of nodes on the scene graph (+- 2000 in the image above). The graph is built, step-by-step, by adding Circles and Paths to a StackPane. Both the circles and paths can be semi-transparant. For a low number of nodes, I'm getting a solid 60 FPS, but this lowers over time to about 5 FPS. As soon as I stop adding new nodes, the framerate shoots up to 60 FPS again. The framerate still drops even when all the nodes are outside the viewport.

My questions are:

\* Is calling Platform.runLater() about 2000 times/minute too much?

\* Could this simply be a problem with my graphics card? (I have an Intel HD Graphics 3000)  
\* The JavaFX pulse logger says things like this, is there any significant information in this that I'm missing?

PULSE: 1287 [163ms:321ms]

T14 (0 +0ms): CSS Pass

T14 (0 +5ms): Layout Pass

T14 (6 +152ms): Waiting for previous rendering

T14 (158 +0ms): Copy state to render graph

T12 (159 +0ms): Dirty Opts Computed

T12 : Slow shape path for null

T12 (159 +160ms): Painted

T12 (319 +2ms): Presentable.present

T12 (321 +0ms): Finished Presenting Painter

Counters:

Cached region background image used: 14

NGRegion renderBackgroundShape slow path: 1

Nodes rendered: 1839

Nodes visited during render: 1840

Kind regards,

Youri

This post has been answered by jsmith on Mar 23 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2015
Added on Mar 22 2015
3 comments
1,678 views