注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

奕克

爱家人爱工作爱生活

 
 
 

日志

 
 

安卓结束任务清空内存是否有用?以及节电措施  

2012-08-11 18:23:51|  分类: 计算机技巧 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
  
     一老外的文章,机锋上看到的,写的还不错,对那些喜欢用360时不时清空下内存的同志有帮助。抓重点翻译一下,有些看不懂的回头再看看:
   
    Android Task Killers Explained: What They Do and Why You Shouldn’t Use Them
       Android task killers improve your phone's performance while also boosting battery life—or at least that's the much-debated promise. Here's a look at how task killers actually work, when you should (or shouldn't) use them, and what you can do instead.

      A task killer is an app from which you can (sometimes automatically) force other apps to quit, the hope being that the fewer apps you have running in the background, the better your Android's performance and battery life will be. Not everyone agrees with this premise, though. The argument about whether task killers are effective rages all over the internet: Android forums are full of threads with constant bickering and conflicting anecdotal experience, making it difficult for most users to make sense of the situation.
    任务结束器是一种能够强制其他应用程序退出,以便在后台运行更少应用程序的应用。
     Below, I'm going to dig into the truth about Android task killers: that apart from maybe some older phones, Android manages tasks fairly well on its own, and how task killers present quite a few problems. I'll also take a look at the rare occasions when they're useful, and offer some alternatives you should try to improve your phone's performance and battery-life quirks.

      Before we dive in, here's a quick overview of how Android handles process management by default.

How Android Manages Processes

    In Android, processes and Applications are two different things. An app can stay "running" in the background without any processes eating up your phone's resources. Android keeps the app in its memory so it launches more quickly and returns to its prior state. When your phone runs out of memory, Android will automatically start killing tasks on its own, starting with ones that you haven't used in awhile.
      安卓将一些应用保存在内存中,是为了以后再次使用时更快的重复读取和启动,如果可用内存低于阈值,安卓会自动结束那些空闲时间最久的任务。

   The problem is that Android uses RAM differently than, say, Windows. On Android, having your RAM nearly full is a good thing. It means that when you relaunch an app you've previously opened, the app launches quickly and returns to its previous state. So while Android actually uses RAM efficiently, most users see that their RAM is full and assume that's what's slowing down their phone. In reality, your CPU—which is only used by apps that are actually active—is almost always the bottleneck.
   问题在于安卓使用RAM的方式与windows不同,在安卓上,让RAM接近完全利用是一件好事,这意味着应用重新启动时可以更快的回到先前的状态,跟有效的利用了RAM。实际上,不是RAM满了,而是你的cpu占用率才是手机快慢的瓶颈。

Why Task Killers Are (Usually) Bad News

      Apps like Advanced Task Killer, the most popular task killer in the Market, act on the incorrect assumption that freeing up memory on an Android device is a good thing. When launched, it presents you with a list of "running" apps and the option to kill as many as you want. You can also hit the Menu button to access a more detailed "Services" view, that lists exactly which parts of each application are "running", how much memory they take up, and how much free memory is available on your phone. This set-up implies that the goal of killing these apps is to free up memory. Nowhere on the list does it mention the number of CPU cycles each app is consuming, only the memory you'll free by killing it. As we've learned, full memory is not a bad thing—we want to watch out for the CPU, the resource that actually slows down your phone and drains your battery life.
    当前市场上使用的一些任务结束器,只是简单给出了每个应用程序占用的内存数量,但却没有提示该应用使用了多少cpu使用周期。问题是,RAM近乎完全利用不是一件坏事,我们想要知道的哪个应用程序占用了更多的cpu资源,使手机变慢,消耗电池。
       Thus, killing all but the essential apps (or telling Android to kill apps more aggressively with the "autokill" feature) is generally unnecessary. Furthermore, it's actually possible that this will worsen your phone's performance and battery life. Whether you're manually killing apps all the time or telling the task killer to aggressively remove apps from your memory, you're actually using CPU cycles when you otherwise wouldn't—killing apps that aren't doing anything in the first place.
    因此,有可能任务结束器会让手机性能和电池情况变得更坏,因为你让它们使用cpu,去结束一些根本什么事情都不做的应用。后期这些应用再次使用时,又要从ROM读入RAM,这也是消耗cpu和电池的。

      In fact, some of the processes related to those apps will actually start right back up, further draining your CPU. If they don't, killing those processes can cause other sorts of problems—alarms don't go off, you don't receive text messages, or other related apps may force close without warning. All in all, you're usually better off letting your phone work as intended—especially if you're more of a casual user. In these instances, a task killer causes more problems than it solves.
   事实上,一些应用被结束的相关进程,有可能是系统必须的,会再次被启动,因此会进一步吸干你的cpu资源。一些进程的结束也可能会引起不能收到短信,应用强制退出等系统错误。

What You Should Do Instead
       That said, not all apps are created equal. Many of you have used task killers in the past and actually found that after freeing up memory, your phone works a bit better. It's more likely that this is because you've killed a bad app—one that was poorly coded, and (for example) keeps trying to connect to the internet even when it shouldn't. Any performance increase you experience is more likely because you killed the right app, not because you freed up loads of memory (or, in many cases, it's just placebo). Instead of killing all those apps, find out which ones are actually causing the problems. If you really know what you're doing, you may benefit from using a task killer to stop the one or two inefficient-but-loved apps on your phone.
      很多时候,你使用任务管理器结束一些应用,发现手机性能改善了,这更可能是由于这个应用编码写的很差,比如经常在不需要联网的时候去联网。而不是由于你释放了内存的原因。你可以试着去查找这样的很差劲的应用。

        Note, however, that this is still a contested notion. A lot of developers (including ROM builder extraordinaire, Cyanogen) will not even look at your bug reports if you're using a task killer. In this humble blogger's opinion, your best bet is to stay away from regular task killer usage entirely. If you absolutely have to have that one battery-killing app on your phone, though, kill away—just be aware that when you experience a recurring Android bug later on, the task killer may be at fault. Of course, you can just stop using it to determine whether that is or isn't the case.

       With task killers firmly in the better-off-without box, there are still a number of other things you can do to fill the void, improving your performance and battery life:
       除了任务管理器,还有一些其他措施可以改善手机性能和续航时间。

      Watch for Runaway Processes: Previously mentioned Watchdog is a slightly different kind of task killer, in the sense that instead of telling you your phone's out of memory and it's time to go on a task killing spree, it alerts you when the occasional app starts eating up CPU for no reason. You can then kill the app with Watchdog and get on with your day (though honestly, at that point, I usually just reboot my phone). If it happens often with the same app, however, you may want to move on to the next step.
    查找那些偷偷运行的进程,watchdog可以用来查看哪些进程时不时的偷偷启动,无理由的消耗cpu资源。

      Uninstall Bad Apps: Worse than the occasional, one-time runaway app is the poorly coded, always-eating-CPU app. If you find (with Watchdog or through some other method) that a particular app seems to drain CPU and battery life whenever it's running, confirm your suspicions by uninstalling it and seeing what happens. If an app is causing problems on your phone, you're probably better off without it.
      将一些差劲的应用程序卸载,如果怀疑那些一个劲的使用cpu资源的差劲应用程序,你可以将它卸载后验证你的怀疑。

      Root Your Phone: We advocate rooting Android devices a lot at Lifehacker, but that's because it really is as useful as everyone says it is. You can over- and underclock your phone with SetCPU, install custom ROMs that noticeably improve performance and battery life, and use the ever-useful, crapware-thwarting Autostarts utility to stop apps from starting up on your phone in the first place. Honestly, with one-click rooting apps like previously mentioned Universal Androot available for most phones, rooting only takes a few minutes to do, and you'll be much happier for it.
     root你的手机,你可以超频或者降频你的CPU,刷入第三方的ROM,来显著改善手机性能和续航。利用工具去停止一些随手机启动的不必要软件。

     Update: Many of you also mentioned the root-only app Titanium Backup, which will help you get rid of the pre-installed crapware that comes on most phones, which are one of the worst offenders of phone lag. Thanks to all of you that sent this in!

      Seriously, Use the Power Control Widget: This may sound ridiculously obvious, but if you aren't already using some form of the Power Control widget, you should. The things that drain the most battery on any smartphone are Wi-Fi, Bluetooth, GPS, and your screen. Turn them off when you don't need them and you'll find that you can eke out considerably more battery life.
      更重要的是,使用电量控制部件,大量使用电池和cpu资源的是wifi,蓝牙,gps,和你的屏幕,在不需要的时候关闭它们,你会得到可观的续航时间。

      Charge Your Phone: Even more obvious yet rarely heeded advice: Charge your phone often. This isn't as hard as it sounds for most people. While you're sometimes stuck going out for 14 hours with no place to charge your phone, the majority of us spend our days in our homes, our offices, and other places rife with electrical outlets. Buy a few extra chargers and place them strategically around your home, car, and office. Whenever you're sitting around at home or working away at your desk, you can use that time to dock your phone and give it some extra juice without worrying about battery or performance drains. Before I upgraded to Android 2.2, my battery life was pretty awful, but just having a charger in my car and next to my computer made a huge difference in how often I got the dreaded "low battery" message.
      充电:准备一些充电设备,时不时的给手机充充电,这才是治本之道。。。

      Task managers are a controversial subject in Android-land. We've done our research and this is what we came up with, but we're always keen to hear how similar or different your experience is, so share with us in the comments.
      任务管理在安卓领域是一个很有争议的话题,我们做了一些研究,并作了结论。当我们总是渴望能听到一些相同或者不同的你的经历和经验,所以可以在评论里与我们共享。
  评论这张
 
阅读(974)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017