I see. Approved.

-phil.

On 9/8/2012 4:30 AM, Andrew Brygin wrote:
Hello Phil, and Jennifer,

 could you please review a fix for 7181199?

 The observed difference in the consumed time is caused by
 SunFontManager::loadFonts(): in case of headless, it takes
 much more time to complete. In fact all this time is spent
 in registerFontsOnPath() (about 4000ms in headless mode
 instead of 0ms in normal mode).

 This method takes significant time in headless mode, just
 because it handles font path "/Library/Fonts" which was
 returned by getPlatformFontPath(), whereas  in case of
 normal mode, the returned font path is empty.

 The method  getPlatformFontPath() delegates actual work to
 getFontDirs() which is overloaded in CFontManager. In case
 of CFontManager, this delegate checks whether default toolkit
 is an instance of LWCToolkit, and returns empty path in that
 case. Otherwise, it returns "/Library/Fonts" path, in assumption
 that X11 toolkit is used.

 Obviously, this check does not work in case of HeadlessToolkit,
 where the underlying toolkit instance need to be checked.

 Please note that in jdk8 this issue is masqueraded by a problem
 reported in CR 7194935, which prevents a running applications in
 headless mode.

 Please take a look.

Bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181199
Webrev: http://cr.openjdk.java.net/~bae/7181199/8/webrev.00/

Thanks,
Andrew

Reply via email to