Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to speed up build?

MichalDobrodenka.3459MichalDobrodenka.3459 USMember ✭✭
edited November 2016 in Xamarin.Android

Our App takes 1 minute to build on overclocked High end PC, it's not a tragedy, but could be better.

Our application is packed with tons of resources. Everything is in one project, linked shared files. Most of the time is spent in AAPT, even when there is only a small c# code change.

How to prevent long resource build? We tried to move resources into separate project, but it didn't really helped. Without any benefit we tried to build resources project and reference it not as a project but as a compiled assembly only. No luck.
When I tried setting AndroidExplicitCrunch on project, it didn't build, when I tried it on solution with separate resource project on resource project, it helped - 1-2 secs only.
We are using Android support libraries.

Is there any way how we can speed up build? How to set not to process all of the resources every build?

Posts

  • HrushikeshHrushikesh USMember

    Hi @MichalDobrodenka.3459,

    You can check "Use Fast Deployment (debug mode only)" option from project properties and try build.

    It should fasten your build for Xamarin.Android (Native) app.

  • Thank you, I have already "Use Fast Deployment (debug mode only)" already checked

  • RicardoJarreeRicardoJarree USMember ✭✭

    I'm not entirely sure whether or not it would speed anything up but maybe putting the project on an ssd might help. I notice, for me at least, a lot of the time is spent compiling all of the resources which is on a hard drive.

    I don't think a multithread CPU is going to make a difference. I have a six core and when compiling only 15%ish is used, so building is not effected by cores.

  • LjusnanLjusnan DEMember ✭✭✭
    edited November 2016

    I think this is a Xamarin problem. There are other people who experience this as well. Hopefully this will get fixed soon. https://forums.xamarin.com/discussion/82341/build-time-is-too-long
    https://forums.xamarin.com/discussion/comment/234337

  • Thank you, I have already "Use Fast Deployment (debug mode only)" already checked.

    @RichardJarrett I'm on Sandisk Extreme Pro SSD. Only thing to speed up build is better single thread performance. From 2 cores up improvement per core is neglible. So best development PC could be intel i3 overclocked to 5 GHz.

Sign In or Register to comment.