提高Android应用程序的性能 [英] Improve android application performance

查看:129
本文介绍了提高Android应用程序的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个应用程序,它可以通过后台服务跟服务器发送请求并得到响应回来。如果我执行一些操作(例如发送请求和响应得回)约20-30次,我的应用程序变得非常慢,我可以用pressing任何按钮,观察它 - 响应变得很慢。

I have written an app which can talk to server via background service to send the request and get the response back. If I perform some operation (e.g send request and get response back) around 20-30 times, my application becomes very slow and I can observe it by pressing any button - the response becomes very slow .

如果你不断地执行相同的操作,一段时间后,一个弹出消息显示说:该应用程序的活动对不起,没有响应。

If you continuously perform the same operation, after some time a pop up message displays saying "Sorry Activity of the application is not responding".

我怎样才能解决这个问题?这似乎是我的应用程序会消耗更多的内存,所以我怎么能解决这个问题或有任何可用的工具,它可以是可插拔的Eclipse和将显示应用程序的内存消耗的报告,并建议泄漏区域。

How can I resolve this issue? It seems like my app consumes more memory, so how can I resolve it OR is there any tool available which can be pluggable with Eclipse and will display the reports of memory consumption of the App, and suggest the leak area.

推荐答案

1.对于内存问题:月食有记忆跟踪功能强大的工具:的的内存分析工具
请询问技巧的使用指南参考如下:(参考文献1,2)

1.For Memory issue: Eclipse have powerful tool for memory tracking: Memory Analyzer tool Please refer references below for use guide of tips: (Ref.1, 2)

2.对于ANR问题:为了避免ANR对话框,你可以把网络服务的实施背景在工作线程或Asyntask实施

2.For ANR issue: To avoid ANR dialog you can put implement of network service to background implement in worker thread or Asyntask

参考文献:


  1. <一个href=\"http://1.http//stackoverflow.com/questions/1147172/what-android-tools-and-methods-work-best-to-find-memory-resource-leaks\" rel=\"nofollow\">http://stackoverflow.com/questions/1147172/what-android-tools-and-methods-work-best-to-find-memory-resource-leaks

<一个href=\"http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android\">How发现在我的Andr​​oid应用程序内存使用

这篇关于提高Android应用程序的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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