Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
The dynamic registrar inspects (via RegisterTypeUnsafe) the whole app domain's types, interfaces and methods to find register-able NSObject inheriting types.
In a complex app, this processing can roughly 10% of the startup time.
Given that the package's content never changes, the build process should be able to provide a pre-computed table to the dynamic registrar, for types known at compile time.
This is already on the map.
There's a static registrar that does exactly what you're requesting.
You can select the static registrar by adding "--registrar:static" to the additional mtouch arguments in the project's iOS Build options.
The static registrar is the default for device builds, but not for simulator builds (using the static registrar makes the build longer; for the simulator the added build time is usually longer than the gained startup time, while for the device it's the opposite).
Some time ago we added an intermediate mode: we pre-compute (run the static registrar) for only Xamarin.iOS.dll, then we ship this information, and use this pre-computed information for simulator builds when we can. This speeds up the launch time in the simulator significantly, since we only need to process any user assemblies at runtime (in any case you can always manually select the static registrar anyway).