Bug 6135 - Build and run operations are very slow when projects have a lots of assembly references
Summary: Build and run operations are very slow when projects have a lots of assembly ...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: Trunk
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-16 07:39 UTC by Lopatkin Ilja
Modified: 2012-11-20 02:43 UTC (History)
1 user (show)

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


Attachments
Patch (2.69 KB, patch)
2012-07-16 07:40 UTC, Lopatkin Ilja
Details


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:
Status:
RESOLVED FIXED

Description Lopatkin Ilja 2012-07-16 07:39:25 UTC
For example, when using DevExpress and eXpressApp libraries, projects have lots of different assembly references that are very nested. And so if I try to run or build one of my projects it takes something about a minute to check whether project should be built or no. During this process memory consumption constantly jumps from 200-300 Mb up to 1.2-1.3 Gb and back.
I've done some debugging and found out that MD rereads assembly definition via Cecil every time it's required. Which in turn causes the whole binary to be loaded into memory. My thought was to cache this data for the current MD session. There's a rough patch in attachment that shows the idea. With caching projects starts and build almost immediately. But I'm not sure whether it's correct and/or respects any style guides adopted by MD.
Comment 1 Lopatkin Ilja 2012-07-16 07:40:13 UTC
Created attachment 2199 [details]
Patch
Comment 2 Lopatkin Ilja 2012-11-20 02:43:07 UTC
It seems that switching to IKVM reflection fixed this bug without the need of introducing some caching.