0 Replies Latest reply: Feb 6, 2013 9:39 AM by 989513 RSS

    Working with Cache and CacheHint property or other performance tips?

    989513
      Hi,

      I've been working with JavaFX for the past couple of months. I developed a GUI frontend to the system we are using. At the moment the application is fully functional and I have reached to point where I would like to slightly improve performance and also include a few transition animations in the navigation. See below for the SceneGraph structure of my applications.

      StackPane (E)
      *** BorderPane (B)
      ****** Top:
      ********* HBox: Logo, 3 toggle buttons for navigation
      ****** Centre (C):
      ********* AnchorPane: (Used for resizing children with window size)
      ************ BorderPane:
      ****** Top: Page/Frame title
      ****** (A) Centre: Content swapped by the different toggle buttons (each is an AnchorPane with different controls)
      ****** Botton: Optionally filled with a TextField displaying messages from a background process.
      ****** Right: Optionally filled with Help content for the current page
      *** (D) Popup dialogs/forms stacked on top of the Border Pane

      I would like to add the following transitions:
      (1) fade out the current centre node of (A), replace it with the new page's node and fade it in.
      (2) Scale down and disable (B) or (C) (depending which of the two seems more natural while adding (D) to (E), which is faded and scaled up.

      i) So to implement these transitions efficiently to which nodes would you advice me to switch on caching?
      ii) should I switch it on at (E) (root), or switch it on to specific nodes involved with animations?
      iii) Is it a good idea to switch on 'high quality' (cache hint) caching for all nodes and switch the cache hint to 'speed' for animating nodes?
      iv) Should I have caching enabled for nodes with textfield, listview and label controls or is that something I should avoid. These include nodes which will be animated by (1)

      Thanks in advance for any suggestions and advice.