Program using Bundled Mono Taking Long Time for First Start - Font Cache Building Takes long time

steve_robinsteve_robin USMember
edited December 2015 in Xamarin.iOS

When trying to run a program with bundled mono runtime(statically linked),during the first launch the icon pops up and stays in the dock for like 2 minutes,then suddenly the window appears.But during the Subsequent runs the program is fast.
I have done some researching and i understand that its the time taken by Mono to Build the font cache.
This can be a turn down the user as the person will think that the program does not work.

Is there a workaround for this like

-copying the font cache folder?
-Integrating some script into the installer to build the fontcache?

Please help



  • steve_robinsteve_robin USMember

    This is the problem already reported
    Seems like this issue still exists in newer versions of mono. @ChrisHamons can you please advice.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    This is a known issues (with System.Drawing, not Xamarin.Mac). The mono guys have tried nailing it down a few times, to no avail. The current bug files is:

    The thread you linked, lists 3 work arounds. None of them are are pleasant though. You could write an installer for you application that implements one of the work arounds at install time.

    Are you running into this due to System.Drawing?

  • steve_robinsteve_robin USMember

    @ChrisHamons Thanks for the reply.Yeah im using System.Drawing.I use it to process images. I have seen the 3 workarounds you suggested but at the end you are saying that "After any of these work around, running your application should invoke one more "slow" startup, and every launch of any Xamarin.Mac application will be fast."

    I currently have only initial(first) slow startup,rest is smooth. Does this comment mean that even after these workarounds the initial startup will be slow.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    Yes. At some point, the libgdi will scan your system (slowly) for fonts. This is one of many reasons that System.Drawing from mono is not supported on Xamarin.Mac.

    If you are interested in getting your hands dirty and testing something I'm working on that might solve your System.Drawing pain, private message me. It's still "not finished", but I wouldn't mind getting some sanity testing.

  • steve_robinsteve_robin USMember

    I would love to get this fixed and test anything :) PMed you.

  • Hello Chris and Steve,

    Any progress on this issue? I'd love to give you solution a try.

  • ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai

    The work I mentioned (way back in 2015) was porting to Unified which has been done for awhile.

    You can try using that library instead of libgdi.

    If you still are seeing the problem with system mono, please feel free to create a new bug and reference However since it's system mono related, it isn't something I'll be working on myself.

Sign In or Register to comment.