Bug 20700 - Xamarin.iOS trampoline resolution contention
Summary: Xamarin.iOS trampoline resolution contention
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 7.2.6
Hardware: Other Other
: --- normal
Target Milestone: Untriaged
Assignee: Zoltan Varga
Depends on:
Reported: 2014-06-18 21:05 UTC by Jerome Laban
Modified: 2014-08-26 13:41 UTC (History)
3 users (show)

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

A synthetic benchmark for the parallel work issue. (47.41 KB, application/x-zip-compressed)
2014-06-18 21:05 UTC, Jerome Laban

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 Jerome Laban 2014-06-18 21:05:41 UTC
Created attachment 7113 [details]
A synthetic benchmark for the parallel work issue.

The improvements made by #18880 over the synthetic benchmark have improved the performance, but there seem to still be some important contention in mono_loader_lock, particularly during the startup of an app that run on multiple threads.

This line is an example of location where the time is spent : https://github.com/mono/mono/blob/078dc0321d53f9e161957656550fd10cc41db618/mono/metadata/metadata.c#L2808

The attached sample demonstrates the issue, showing that on an iPad2, 1 Thread=268ms, 2 threads=380ms.

In a bigger app, the time spent in the lock is significantly larger, particularly when the UI thread is performing work at the same time as background threads.
Comment 1 Zoltan Varga 2014-06-19 06:18:45 UTC
This has already been fixed in mono dd72864f564231c324248c3fd75b55054debc1e4, but that commit is not yet in the stable xamarin.ios release.
Comment 2 Sebastien Pouliot 2014-06-20 16:19:02 UTC
$ git branch --contains dd72864f564231c324248c3fd75b55054debc1e4
* mono-3.6.0-branch

This fix is publicly available inside XI 7.2.6 (alpha right now) if you want to test it.