Bug 23557 - Performance issues likely due to failure to patch even after bug 23021 fixed
Summary: Performance issues likely due to failure to patch even after bug 23021 fixed
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-10-02 15:26 UTC by Nick Neumann
Modified: 2014-10-02 21:32 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Xamarin.iOS project that reproduces the performance problem (10.91 KB, application/x-zip-compressed)
2014-10-02 15:34 UTC, Nick Neumann

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description Nick Neumann 2014-10-02 15:26:37 UTC

Comment 1 Nick Neumann 2014-10-02 15:34:58 UTC
Created attachment 8291 [details]
Xamarin.iOS project that reproduces the performance problem
Comment 2 Nick Neumann 2014-10-02 15:35:33 UTC
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.
Comment 3 Zoltan Varga 2014-10-02 21:30:47 UTC
Fixed in mono master af33ad4eaac6b2cdd95f120021c2ef3055e09137.
Comment 4 Zoltan Varga 2014-10-02 21:32:10 UTC
Bumped mt master in 98c144271389e042f756956453e4e45c2dbaa019.
Comment 5 Zoltan Varga 2014-10-02 21:32:21 UTC