creating new font object is slow

XMLWordPrintable

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

      MacBook with SnowLeopard (Java 1.6u17), JavaFX 1.2.3

      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 {

      }
      ####

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

              Created:
              Updated:
              Resolved:
              Imported: