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

[macosx] Startup is much slower in headless mode for apps using Fonts

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      b08
    • CPU:
      x86
    • OS:
      os_x
    • Verification:
      Verified

      Backports

        Description

        A simple test case which creates a Font takes much longer (roughly 2 seconds) to startup in headless mode than in headful mode.

        The test case:

        public class HeadlessFont {
            public static void main(String[] args) {
                Font font = new Font("Arial", Font.PLAIN, 32);
                System.out.println("font is: " + font);
            }
        }

        In headless mode, I observe that Activity Monitor shows the fontd process taking the most CPU%, and this activity continues for several seconds after the java process has exited. Disk activity also spikes, again continuing for several seconds longer than the java process.

        This slowdown with headless was not present in JDK6, in fact headless mode started up faster (1.7s in headless vs 2.35s with the above test case on 6u32).

        This caused a >300%/4-second slowdown in startup when we moved our JavaFX testing from 6u26 to 7u4 - JavaFX bug http://javafx-jira.kenai.com/browse/PERF-319.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  bae Andrew Brygin
                  Reporter:
                  bchristi Brent Christian
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: