Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8099474

Text layout in FX is much slower than a pure Swing app

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P3 P3
    • fx2.0
    • fx1.2
    • javafx
    • Vista, 6u14

      Umbrella issue for text layout optimization.

      Investigation of RT-5001 has revealed that text-layout under JavaFX is much slower than under a pure Java app. I've attached a small suite of standalone test cases that demonstrate this. Results on my machine (Vista on a MBP) are as follows:

      JTextLayout.java (pure Java/Swing): ~275fps
      SwingTestLayout.fx (FX, embedded Swing: ~220fps
      TextLayout.fx (pure FX using Text node): ~22fps

      One cause for this has been found, RT-5069.

      Some notes on running the tests:
      * To get fps data for the FX version(s), you'll need:
          * to point -Djava.util.logging.config.file= to the attached logging.properties
              AND
          * a Soma build which includes the RT-4959 fix OR a Soma/Marina build w/ a diff similar to:
              http://jfxsrc.sfbay.sun.com/javafx/soma/scrum/graphics/runtime/rev/557f74ded7ac

      * To get framerates > ~70 for the embedded Swing test (SwingTextLayout.fx), you'll need to increase the javafx framerate with something like:
            -Djavafx.animation.framerate=500

            prr Philip Race
            bchristi Brent Christian
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: