提高android应用程序性能(Improve android application performance)

编程入门 行业动态 更新时间:2024-10-11 21:21:04
提高android应用程序性能(Improve android application performance)

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

如果您连续执行相同的操作,经过一段时间后弹出消息显示“应用程序的对应活动未响应”。

我该如何解决这个问题? 这看起来像我的应用程序消耗更多的内存,所以我该如何解决它,或者是否有任何可用Eclipse插件的工具,并将显示应用程序的内存消耗报告,并建议泄漏区域。

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".

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.For内存问题 :Eclipse具有强大的内存跟踪工具: 内存分析工具请参考以下参考资料以获取提示使用指南:(参考文献1,2)

2.对于ANR问题 :为了避免ANR对话框,您可以在工作线程或Asyntask中将网络服务的实现部署到后台工具

参考文献:

哪些Android工具和方法最适合查找内存/资源泄漏?

如何在Android中发现我的应用程序的内存使用情况?

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.For ANR issue: To avoid ANR dialog you can put implement of network service to background implement in worker thread or Asyntask

References:

What Android tools and methods work best to find memory/resource leaks?

How do I discover memory usage of my application in Android?

更多推荐

本文发布于:2023-08-05 17:14:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1437177.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   性能   android   performance   application

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!