本文介绍了WP SilverLight的8.1 ​​VS WP 8.1(XAML)的利弊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我一直在读那Wp8.1(XAML)应用程序是Windows Phone的8.1创建应用的新途径,代码是Windows 8.1桌面应用程序高度可重用的。

I have been reading that Wp8.1 (XAML) apps are the new way of creating apps for Windows Phone 8.1, and the code is highly reusable for Windows 8.1 Desktop apps.

但我是一个有点,因为从联系人(中的ContactManager XAML WP8.1)执行一个搜索担心比Silverlight的对应方法要慢。

But im a bit worried since performing a single search from the Contacts (ContactManager in WP8.1 XAML) is way slower than the Silverlight counterpart.

刚回国从我的议程上的所有联系人(240电子邮件,缩略图等接触......)发生在我的Lumia 15203秒;与Silverlight代码相同的操作需要0.7秒。

Just returning all contacts from my Agenda (240 contacts with emails, thumbnails, etc...) takes 3 seconds in my Lumia 1520; the same operation with Silverlight code takes 0,7 seconds.

我有点害怕使用WP8.1以使应用程序对手机造成的性能对我来说非常重要的。在535的Lumia相同的测试需要7秒,1.5秒,分别从我的Lumia 1520的联系人。

I am a bit afraid to use WP8.1 to makes apps for phone cause the performance is pretty important to me. The same test on a Lumia 535 takes 7 seconds and 1,5 seconds respectively with the contacts from my Lumia 1520.

有没有recomendation上使用什么样的项目?我觉得都集中Silverlight应用程序(显然)在Windows手机和使用所有的电话的功能。

Is there any recomendation on what kind of project to use? I feel Silverlight apps are (obviously) focused in Windows Phone and use all the phone's capabilities.

我错了吗? ?我已陷入弃用路靠捡的Windows Phone的Silverlight

I am wrong? Am I heading into a deprecation road by picking windows phone silverlight?

请注意:用于执行搜索的代码是从MSDN的例子之一...

Note: The code used to perform the search is the one from the MSDN Examples...

WP8.1 XAML(诺基亚Lumia 1520,3秒获得240缩略图,邮件帐户等..触点)

ContactStore agenda = await ContactManager.RequestStoreAsync();
Stopwatch sw = new Stopwatch();
IReadOnlyList<Windows.ApplicationModel.Contacts.Contact> contacts = null;
sw.Start();
contacts = await agenda.FindContactsAsync();
sw.Stop();
txtblock1.Text = sw.ElapsedMilliseconds;



WP的Silverlight 8.1(诺基亚Lumia 1520,0,7秒获得240缩略图接触,邮件帐户等)

Contacts agenda = new Contacts();
//Stopwatch is declared at class level so its accessible in ListContacts_SearchCompleted Callback
sw.Start();
agenda.SearchCompleted+= ListContacts_SearchCompleted;
agenda.SearchAsync(String.Empty, FilterKind.None, null);
//sw.Stop() and print ElapsedMilliseconds in ListContacts_SearchCompleted callback



编辑:创建后在这方面的

推荐答案

您比较同样的事情?

在Silverlight的版本中,你只能叫sw.Stop在完成处理程序。

In the Silverlight version, you can only call sw.Stop in completion handler.

如果你真的想要做的比较不错,你应该得到的ETW跟踪;然后你才能真正明白是怎么回事了。

If you really want to do a good comparison, you should get an ETW trace; then you can really understand what's going up.

对于基于XAML新城的解决方案,可能会有额外的互操作成本。但是,这似乎是未来的道路。

For Metro XAML based solution, there may be extra interop cost. But that seems to be the future path.

有关Silverlight的,现有的API可能是PERF的更精致。

For Silverlight, existing API may be more polished for perf.

可能是你应该在这两个解决方案的工作,让共享代码尽可能大,后来决定采取哪种方式。

May be you should work on both solutions, make shareable code as big as possible, and later decide which way to take.

这篇关于WP SilverLight的8.1 ​​VS WP 8.1(XAML)的利弊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 01:19