1

I'm working on an app where I need to draw a lot of data. There are different functions that can be used to work with the data. The main functions share two views, that right now I draw every time I start the functions. They differ in the middle part where the data is displayed different. Right now my main goal is to improve the performance of the app. When I switch from view A to B runs smoother than the other way around. My idea is to store all the parts (from all views) in a list so when I jump back to the view I can reuse them instead of building them again. Is this a good idea? Are there some general performance advices when building an app with javafx?

example view with parts

Yupp
  • 315
  • 3
  • 18
  • Are any of the parts of the views _dynamic_? I.E.: Do they change its appearance at run time? – Little Santi Aug 08 '18 at 22:26
  • yes, you can edit part A and part B1 will react to it by updating the table (part B1 is mainly a table of all classes that are displayed in part A). part B2 and part C stay the same. – Yupp Aug 08 '18 at 22:36
  • Possible duplicate of [JavaFX 2 drawing performance](https://stackoverflow.com/questions/10506637/javafx-2-drawing-performance) – user1803551 Aug 08 '18 at 23:36

1 Answers1

1

In GUI desktop development, there is a technique named "double buffering", which is useful to make fast screen flips:

It consists on having two separated and different panels that occupy the whole application viewport and that must be permanently updated, but just one of them must be visible at the same time. Changing from one to another is as fast as to hide one of them and to show the other one.

Little Santi
  • 8,563
  • 2
  • 18
  • 46