Windows Phone 7 - 加速数据获取的最佳实践
我有一个 Windows Phone 7 应用程序(当前)调用 OData 服务来获取数据,并将数据放入列表框中。现在速度慢得可怕。我首先想到的是 OData 返回的数据比我实际需要的多得多。
对于加快 Windows Phone 7 应用程序中的数据获取速度,有哪些建议/最佳实践?我可以在应用程序中做些什么来加快数据检索并更快地将其呈现在用户面前?
I have a Windows Phone 7 app that (currently) calls an OData service to get data, and throws the data into a listbox. It is horribly slow right now. The first thing I can think of is because OData returns way more data than I actually need.
What are some suggestions/best practices for speeding up the fetching of data in a Windows Phone 7 app? Anything I could be doing in the app to speed up the retrieval of data and putting into in front of the user faster?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
听起来你已经有了一些关于要追逐什么的线索。
我尝试的一些基本操作是:
Sounds like you've already got some clues about what to chase.
Some basic things I'd try are:
除了 Stuart 的精彩列表之外,还要考虑发送的数据的格式。
查看 Rob Tiffany 的这篇博文。它讨论基于数据格式的性能。它是专门针对 WCF 编写的,但要点仍然适用。
In addition to Stuart's great list, also consider the format of the data that's sent.
Check out this blog post by Rob Tiffany. It discusses performance based on data formats. It was written specifically with WCF in mind but the points still apply.
作为 Stuart 列表的扩展:
实际上有 3 个领域 - 通信、解析、UI。单独测量它们:
不管你信不信,它也可以是 UI。
例如,ProgressBar 使用不当可能会导致处理速度急剧下降。 (一般来说,您不应使用任何 UI 动画,如此处所述。)
此外,请确保 UI 处理不会阻止数据通信。
As an extension to the Stuart's list:
In fact there are 3 areas - communication, parsing, UI. Measure them separately:
Whether you believe or not it can be also the UI.
For example a bad usage of ProgressBar can result in dramatical decrease of the processing speed. (In general you should not use any UI animations as explained here.)
Also, make sure that the UI processing does not block the data communication.