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 8291 [details]
Xamarin.iOS project that reproduces the performance problem
Bug 23021 was fixed and improved performance of our iOS app dramatically both at launch and in specific operations that occur in our app. The fix also fixed the repro I provided showing how we could spend over 90% of our time in generic_trampoline_jit.
However, even with the fix, we still spend quite a bit of our launch time and other operations in generic_trampoline_jit. I took one of the remaining problematic scenarios in our app and distilled a new repro out of it. This repro involves iterating over an IEnumerable that uses a lot of templated structs. It does all of this at launch and a simple foreach spends over 90% of its time in generic_trampoline_jit.
My best guess is that there are still situations where we fail to patch, and this can be very costly if it is during something like an enumeration that is running often.
The repro is attached. Just build (with a Xamarin.iOS build that has the changes from 23021 incorporated) and deploy to an iOS device and then launch via instruments. Let it run for 20-30 seconds to see the time we spend in generic_trampoline_jit.
Fixed in mono master af33ad4eaac6b2cdd95f120021c2ef3055e09137.
Bumped mt master in 98c144271389e042f756956453e4e45c2dbaa019.