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

creating new font object is slow

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: fx1.2.3
    • Fix Version/s: fx1.3
    • Component/s: javafx
    • Labels:
      None
    • Environment:

      MacBook with SnowLeopard (Java 1.6u17), JavaFX 1.2.3

      Description

      Globals.<clinit> takes about 1.3 seconds on a recent MacBook with SnowLeopard (Java 1.6u17) creating 9 Font objects from the same font family. It spends 90% of the time in Font.userInit$() according to NB profiler.

      ####
      public def fontFamily = "Verdana";
      public def fontFamilyBold = fontFamily;
      public def font9 = Font { name: fontFamily size: 9};
      public def font9bold = Font.font(fontFamilyBold, FontWeight.BOLD, 9);
      public def font12 = Font { name: fontFamily size: 12};
      public def font12bold = Font.font(fontFamilyBold, FontWeight.BOLD, 12);
      public def font12italic = Font { name : fontFamily size: 12};
      public def font16 = Font { name: fontFamily size: 16};
      public def font16bold = Font.font(fontFamilyBold, FontWeight.BOLD, 16);
      public def font20 = Font { name: fontFamily size: 20};
      public def font20bold = Font.font(fontFamilyBold, FontWeight.BOLD, 20);

      public class Globals {

      }
      ####

        Attachments

          Activity

            People

            • Assignee:
              prr Philip Race
              Reporter:
              tbutterjfx Thomas Butter (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: