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

Text effect causes poor performance

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u74
    • javafx
    • x86
    • other

      FULL PRODUCT VERSION :
      java version "1.8.0_74"
      Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
      Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 10.0.10586]

      A DESCRIPTION OF THE PROBLEM :
      When including the following text node in a fxml file, the performance drops extremly:

      <Text layoutX="14.0" layoutY="385.0" stroke="#da0f0f" strokeType="OUTSIDE" strokeWidth="2.0" text="Servers" underline="true" wrappingWidth="137.6708984375">
                     <font>
                        <Font name="Papyrus" size="30.0" />
                     </font>
                  </Text>

      It's within an AnchorPane which is part of a SplitPlane. Commenting the Text out immediately makes the app smooth to use again.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Set up a new Java project (used Eclipse Mars) and create 2 files with the content submitted under 'Source code for an executable test case'.
      Then move the split plane up or down. It is responding after a delay only.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------

      fxml:
      <?xml version="1.0" encoding="UTF-8"?>

      <?import javafx.scene.effect.*?>
      <?import javafx.scene.image.*?>
      <?import javafx.scene.canvas.*?>
      <?import javafx.scene.control.*?>
      <?import javafx.scene.text.*?>
      <?import java.lang.*?>
      <?import javafx.scene.layout.*?>
      <?import javafx.scene.layout.AnchorPane?>

      <SplitPane dividerPositions="0.7738927738927739" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" orientation="VERTICAL" prefHeight="860.0" prefWidth="1271.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
        <items>
          <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="660.0" prefWidth="1168.0">
               <children>
                  <Text layoutX="14.0" layoutY="385.0" stroke="#da0f0f" strokeType="OUTSIDE" strokeWidth="2.0" text="Servers" underline="true" wrappingWidth="137.6708984375">
                     <font>
                        <Font name="Papyrus" size="30.0" />
                     </font>
                  </Text>
               </children></AnchorPane>
               <AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="127.0" prefWidth="1137.0" />
        </items>
      </SplitPane>

      Test App class:

      package test;

      import javafx.application.Application;
      import javafx.fxml.FXMLLoader;
      import javafx.scene.Scene;
      import javafx.scene.control.SplitPane;
      import javafx.stage.Stage;

      public class TestApp extends Application {

      @Override
      public void start(Stage primaryStage) {
      try {
      SplitPane page = (SplitPane) FXMLLoader.load(TestApp.class.getResource("test.fxml"));
                  Scene scene = new Scene(page);
                  primaryStage.setScene(scene);
                  primaryStage.show();
              } catch (Exception ex) {}
      }

      public static void main(String[] args) {
      launch(args);
      }
      }


      ---------- END SOURCE ----------

            kcr Kevin Rushforth
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: