安卓应用发布前优化 [英] Optimising Android application before release

查看:23
本文介绍了安卓应用发布前优化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序效率处于特殊"状态.现在我正处于需要提高应用程序性能并减少电池消耗的阶段.

I'm in a "special" situation about efficiency of my program. Now I'm at a phase where I need to improve the performance of the application and reduce battery consumption.

提问前:

  • First of all, my application work. It runs fine - no errors whatsoever.
  • Secondly, I have read Optimizing Battery Life on Android developers website and I have optimised small things they've requested. No problems whatsoever.

现在,我很想知道其他开发人员的特殊修复程序,这些修复程序用于优化他们自己的应用程序.用户可能永远不会认识或注意的东西.但是,修复程序将延长电池寿命或帮助改进应用程序的维护.

Now, I'm curious to know about other developers' special fixes which they have used to optimise their own applications. Stuff that users may never recognise or pay attention to. However, the fixes will either increase the battery life or help improve maintenance of the application.

那么,您的独特优化技巧是什么?

我处于一种特殊情况,我确实在寻找知识,我认为这将是一个很好的机会,可以分享开发人员对他们都曾遇到过的情况的知识.

I'm in a particular situation where I'm really looking for knowledge and I think this will be a great opportunity to share developers knowledge about a situation they've all been in.

请投票选出优秀的答案,因为这将鼓励优秀的开发者分享他们的知识.

Please, vote up great answers as that will encourage great developers to share their knowledge.

推荐答案

在某些时候,您将达到使用已知技巧将达到其极限的地步.此时最好做的事情是分析您的代码,并根据您的特定要求查看哪些方面存在瓶颈.

At some point you are going to get to the point where using known tricks will hit their limits. The best thing to do at this point is profile your code and see what areas are the bottle-necks based on your specific requirements.

使用 MAT 调查 RAM 使用情况使用 Traceview:一篇关于如何使用这些工具来分析您的应用程序的文章.

Investigating RAM usage using MAT and Using Traceview: an article on how to use the tools to profile your application.

这篇关于安卓应用发布前优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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