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

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

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: fx1.2
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Labels:
    • Environment:

      Vista, 6u14

      Description

      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

        Attachments

        1. logging.properties
          0.2 kB
          Brent Christian

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: