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.
Created attachment 5869 [details]
Screenshot showing the hot spot.
The problem here is that we have to do some work before a delegate is first called, like invoke the cctor of the called method, check or all kinds of corner cases like remoting, synchronized methods, closed delegates etc. This can be done when the delegate is created or when its first called. Currently, we do it when it is first called. This has the advantage of being more lazy, but it also means that we suffer the overhead of the trampoline infrastructure, which is not designed to be called a lot of times.
Thanks so much for taking the time to submit this report! I attempted to reproduce this issue based on the bug description with the latest Xamarin.iOS 10.12.0.14, but the Classic API is now obsolete and XS and VS4M won't even start to build the project. If this issue is still occurring for you with the XI Unified API, please reopen this report and attach a project that reproduces the issue, ideally starting with a new template project and then adding just the code necessary to demonstrate the issue.
Reopening based on comment #2.