How to Compare the Performance of Android Apps Written in Java and Xamarin C#? Anyway to Check Quantitative Data (Code & Results)

C# or Java (performance on android)

For what its worth...I recently moved an OpenGL 2D mobile game project I was working on from writing in native code (Java(android) and Objective-c(ios)) to using Mono and C# with Xamarin. So far I have not noticed too much performance difference. I found no performance changes on ios and just a few performance issues on android. Nothing major though and nothing that will make me switch back. I will say I personally enjoy coding in c# much better than Java or Objective-c. My productivity has sky-rocketed as well because now I basically write code once for both platforms...But to answer your question with my experience and opinion, no I don't think you will have any performance issues.

Xamarin cross-platform user experience vs. native development

I'm on the Rdio mobile development team, so I can make some personal reflections from that standpoint.

Xamarin allows you to write native applications in C#. Any slowness, jankiness, ugliness or bad-appiness usually has nothing to do with the Xamarin layer itself.

You save some time being able to share core business logic between your different clients, but you're still writing the UI from scratch, specific to the platform. You're just writing it in C#.

But while you save that time, you're spending it in other ways. All of those SDKs you want to use probably aren't compatible with Xamarin out of the box. You won't be pod install'ing that iOS framework, and you might be reinventing the wheel for handfuls of things. Xamarin takes advantage of the NuGet repo so you have a library of components that handle many of the things most people need (Analytics, Testing, Facebook SDK, JSON parsing, Database, etc etc) but it doesn't cover everything. And it certainly doesn't cover stuff that's out the day of an Apple or Google product announcement.

Any 3rd party code that you do want to import into your project will be done through writing custom bindings. While not usually difficult, it is time consuming. Xamarin has a team of people that specialize in assisting you in this. This fact speaks to the process being messy at times.

So while the slowness, jankiness, ugliness or bad-appiness probably isn't the fault of Xamarin, it might be the fault of you spending time in places you normally wouldn't, or not being able to take advantage of features you normally would. If that 3rd party partner SDK is giving you problems, your troubleshooting may take twice as long because there's a layer that you don't control.

  • UI is a wash. You're writing it from scratch anyway.
  • Business logic is shared. Depending on the app that might be a win if you architect your application to take advantage of it.
  • Compatibility / bleeding edge ability will be lacking. That might not matter to you at all, or you might be the person wanting to take advantage of that hot new API in the next OS release the day it's announced.

My personal thought, without knowing specifics, is if you want to build an application that you plan on being around years from now, and that will take advantage of the latest and greatest, I'd tell you to write natively for each platform. Unless you can really see huge gains in sharing that business logic the upfront gains are minimal. Or if you really like C#.

what about the performance of app developed by VS2015's xamarin

Xamarin provides two technologies to deeply monitor your App performance.

1. Xamarin Test Cloud
Xamarin test cloud provides over 2000 real devices where you can run you application and see how your app performs at different devices.

2. Xamarin Insights
Xamarin insights provides help to see how end users interact with your application, see which user is logged on to your application (user identity), provides instance notification about your app crash..

Now if talk about the app performance itself, its depends on how you code and how you manage your app tasks.But as a whole, the performance is same as compared to any other native app.

Here are different suggestions and reviews about xamarin app development and performance:

Does anyone have benchmarks (code & results) comparing performance of Android apps written in Xamarin C# and Java?

Xamarin cross-platform user experience vs. native development

Native vs cross platform development1 – Performance & limitations

Xamarin vs. Native App Development

For Android App c# is better or java?

You can use Xamarin if you want to develop mobile apps with c#. However, when I ask mobile developers, they prefer to write native apps.

With Xamarin you will have the option of using VS which I think is very good, but you have to consider that it is usable for develop both Android and IOS apps. You have to consider performance and size of the app.

I have to add that Xamarin is now free if you have Visual Studio 2015

So my advice in total would be:

If you need only Android or IOS: go with native

If you need both Android and IOS and it is a small company or if the budget is limited, then go with Xamarin

If not again go with native


There is also a project called Apache Cordova which will do the same using javascript



Related Topics



Leave a reply



Submit