How to save or automate costly font registration report generation time
<p style="color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">Hello Everyone,</p><p style="color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">I am using Birt Spring integration and my report in PDF is taking too much time , after analysis of following server console log i have noticed that different cost of font registration.</p><pre class="_prettyXprint _lang-nocode _linenums:NaN">Sep 10, 2013 4:43:35 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory loadFontMappingConfigINFO: load font config in jar:file:/D:/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ACRD/WEB-INF/lib/org.eclipse.birt.runtime_4.2.2.v20130216-1152.jar!/fontsConfig.xml cost 1309msSep 10, 2013 4:43:35 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/ja/X11/fonts/TT cost:0msSep 10, 2013 4:43:35 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/iso_8859_13/X11/fonts/TrueType cost:1msSep 10, 2013 4:43:35 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/ru.ansi-1251/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:35 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/iso_8859_15/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:35 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in d:/windows/fonts cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in C:/windows/fonts cost:13644msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/X11R6/lib/X11/fonts/truetype cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/ar/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in e:/WINNT/fonts cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in C:/WINNT/fonts cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/iso_8859_2/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/X11R6/lib/X11/fonts/tt cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/th_TH/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/iso_8859_8/X11/fonts/TrueType cost:1msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/iso_8859_7/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/X11R6/lib/X11/fonts/TTF cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/share/fonts/truetype cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in f:/WINNT/fonts cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/ko.UTF-8/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in g:/WINNT/fonts cost:18msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/iso_8859_5/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in f:/windows/fonts cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in d:/WINNT/fonts cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/share/fonts/ko/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/zh_TW/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in e:/windows/fonts cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/share/fonts/zh_TW/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/share/fonts/ja/TrueType cost:1msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/zh_CN.GB18030/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/share/fonts/default/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/X/lib/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/euro_fonts/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/hi_IN.UTF-8/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/zh.GBK/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/X11R6/lib/X11/fonts/OTF cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/iso_8859_9/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/X11R6/lib/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/zh_TW.BIG5/X11/fonts/TT cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/ko/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/zh_HK.BIG5HK/X11/fonts/TT cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/KOI8-R/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/openwin/lib/locale/zh/X11/fonts/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in /usr/share/fonts/zh_CN/TrueType cost:0msSep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in g:/windows/fonts cost:5msSep 10, 2013 4:43:50 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory loadFontMappingConfigINFO: load font config in jar:file:/D:/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ACRD/WEB-INF/lib/org.eclipse.birt.runtime_4.2.2.v20130216-1152.jar!/fontsConfig_win32.xml cost 1263msSep 10, 2013 4:43:53 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory loadFontMappingConfigINFO: load font config in jar:file:/D:/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ACRD/WEB-INF/lib/org.eclipse.birt.runtime_4.2.2.v20130216-1152.jar!/fontsConfig_pdf.xml cost 2063msSep 10, 2013 4:43:55 PM org.eclipse.birt.data.engine.impl.DataEngineImpl shutdown</pre><div><p>From Above font factory loading is taking too much time</p><pre class="_prettyXprint">Sep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in C:/windows/fonts cost:13644ms</pre><div><pre class="_prettyXprint">Sep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in g:/WINNT/fonts cost:18ms</pre><pre class="_prettyXprint">Sep 10, 2013 4:43:49 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory$2 runINFO: register fonts in g:/windows/fonts cost:5ms</pre><div><pre class="_prettyXprint">Sep 10, 2013 4:43:50 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory loadFontMappingConfigINFO: load font config in jar:file:/D:/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ACRD/WEB-INF/lib/org.eclipse.birt.runtime_4.2.2.v20130216-1152.jar!/fontsConfig_win32.xml cost 1263ms</pre></div><div><pre class="_prettyXprint">Sep 10, 2013 4:43:53 PM org.eclipse.birt.report.engine.layout.pdf.font.FontMappingManagerFactory loadFontMappingConfigINFO: load font config in jar:file:/D:/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ACRD/WEB-INF/lib/org.eclipse.birt.runtime_4.2.2.v20130216-1152.jar!/fontsConfig_pdf.xml cost 2063ms</pre><p>Data Engine lifetime first time is</p><pre class="_prettyXprint">INFO: Data Engine lifetime: 22198 ms</pre><p>If i run the same report from other client </p><p>then same report is generated fast with following INFO and there is no font loading log printed on server console as i pasted top of this post.</p><p> </p><div><pre class="_prettyXprint">Sep 10, 2013 5:07:37 PM org.eclipse.birt.data.engine.impl.DataEngineImpl shutdownINFO: Data Engine lifetime: 774 ms</pre></div><p> </p><p> </p><p> </p></div><div> </div></div></div><div> </div><p style="color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">This process only occurs the first time the render is used. Subsequent renders are not problematic. </p><p style="color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">Is there any simple solution for this to initialize font factory in the background??</p><p style="color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">Looking forward help and suggestions.</p><p style="color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;"> </p><p style="color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">Thanks & Regards,</p><p style="color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">Mubashar</p>