跨平台和原生Android应用程序之间的性能差异? [英] Performance difference between Cross platform and Native Android apps?

查看:335
本文介绍了跨平台和原生Android应用程序之间的性能差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用一个应用程序:

I have an app that uses:


  • 位置服务

  • 谷歌云消息与推送通知

  • 共享preferences

有与中央数据库,以保持保存通知的列表进行通信并没有本地数据库。

It communicates with a central database to maintain a list of saved notification and has no local database.

因此​​,应用程序的主要活动是:

So the main activity of the app is to:


  • 跟踪用户位置

  • Track users location

接收推送通知

用户选择preferred类别

User selects preferred categories

用户保存或删除通知

所有这些信息都存储在中央数据库中。

All this information is stored in a central database.

我查询原生Android的性能问题和跨xamarin应用。

I'm querying performance issues between native android and cross xamarin apps.

要使用我的交叉编译器会慢下来的思维方式。

To my way of thinking using a cross compiler would slow things down.

但后来我读到这样的:

<一个href=\"https://medium.com/@harrycheung/cross-platform-mobile-performance-testing-d0454f5cd4e9#.d4gm7t1yb\"相对=nofollow> Xamarin - 一个C#实现为目标的iOS,Android和Windows Phone的。使用Xamarin Studio,您可以写你的整个应用程序在C#编译下来到本地字节code。

Xamarin — A C# implementation that targets iOS, Android, and Windows Phone. Using Xamarin Studio, you can write your entire app in C# and compile it down to native bytecode.

有我决定使用Xamarin C#或原始的Java code产生的code之间的性能差异的方法吗?

Is there a way for me to determine the performance difference between the code generated using C# in Xamarin or the original Java code?

推荐答案

我正在开发的应用程序与Xamarin自3年。我们开发的应用程序的大量不同用途的(消费,声音分析,presentations活以下,传感器数据的实时三维可视化,...)。在我们的项目中,我们有这样的从Xamarin引起的没有性能问题。所有的性能问题,我们已经,会在本地开发了性能问题,太(因为原生的行为知识的一些滞后)。

I'm developing apps with Xamarin since 3 years. We developed apps for lots of different usages (Consumer, Sound analytics, live following of presentations, "real time" 3D visualization of Sensor Data, ...). In our projects, we had no performance issues that were caused from Xamarin. All performance issues, we had, would have been performance issues in native development, too (because of some lag of knowledge of the native behavior).

==>学习:在这一天结束时,你必须了解的平台细节

==> Learning: At the end of the day, you have to know about the platform specifics.

通过Xamarin,你有本机API直接访问。

With Xamarin, you have direct access to the native APIs.


  • 要本地UX没有区别,因为所有的意见都是本地

  • 部分的情况下(仅限Android)单声道运行速度更快那么JavaVM的。 <一href=\"http://stackoverflow.com/questions/17134522/does-anyone-have-benchmarks-$c$c-results-comparing-performance-of-android-ap\">Does人有基准(code和;结果)?写在Xamarin C#和Java的Andr​​oid应用程序的性能比较

  • no difference to native UX, because all Views are native
  • in some cases (Android only) the mono runtime is faster then the JavaVM. Does anyone have benchmarks (code & results) comparing performance of Android apps written in Xamarin C# and Java?

有几个客户的主要缺点是更大的APK文件,因为你用它提供单声道运行。对于正常的应用程序,它无关紧要。

The major disadvantage for few of our customers was the larger apk-file, because you are delivering the mono runtime with it. For "normal" apps, it doesn't matter.

重要的是选择技术的基础上,你的团队了。与C#,Visual Studio中的团队成员的经验,...?如果你的团队是新Xamarin,你应该至少有一个有经验的开发人员每个主题:

Important is to select the technology, based on your team, too. Have the team members experience with C#, Visual Studio, ...? If your team is new to Xamarin, you should have at least one experienced developer for each of these topics:


  • 的Andr​​oid

  • C#/ Visual Studio中

  • 的iOS

然后,它应该很容易与Xamarin开发伟大的应用程序。

Then it should be easy to develop great apps with Xamarin.

这篇关于跨平台和原生Android应用程序之间的性能差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆