Una comunidad para intercambiar opiniones, consejos y datos sobre el nuevo chiche de Samsung - Android.

Ver más
  • 4,892 Miembros
  • 1,679 Temas
  • 1,284 Seguidores
  • 0

[INTERESANTE] Malas Noticias Sobre El Advance Task Killer

Bueno navegando por taringa...encontre esta info....
aclaro que yo no lo escribi..solo lo encontre y creo q todos lo tienen q saber....

Debajo de mi humilde explicacion, se encuentran explicaciones tecnicas sobre el tema:


He leído varias explicaciones de programadores y técnicos en el tema, en varios foros de esos que hackean.

El tema es que el hecho de usar task killers hace que la batería dure menos y que en realidad matemos cosas en momentos que no hay que matarlas.

El Android, o por lo menos el sistema linux, corre como un rooter, de modo que no va a quitarle velocidad a aplicaciones que corra si hay otras background. Cuando necesite memoria, éste va a matar a las aplicaciones que a el le parezca que son convenientes y de poco uso, haciendo asi mucho mas efectiva la implementación de las aplicaciones en background e incrementando la batería.

A mi me pasó que el hecho de tener el task killer hacia que se me tilde el phone... lei este tipo de artículos y me dije " voy a probar una semana sin task killer ".

El hecho es que incrementé la duracion de la bateria, no se me tilda mas el phone y las aplicaciones que generalmente quedan en background son las que uso constantemente. Al rato a veces, puedo ver que el android si no la usé, la mató sola.

Es como el dicho ese que es mejor dejar el auto encendido en la parada del tren, que va a gastar mucho menos que si lo apagas y lo volves a prender... bueno, una cosa así es con las aplicaciones que matas y las vuelves a correr.

Otra cosa muy característica ahora es que las aplicaciones están viniendo con EXIT, por lo menos las mas desarrolladas, por lo tanto, en un futuro supongo que esta función tendrá que venir en todas las aplicaciones, dándonos la posibilidad de salir y no dejarla background.

Hagan la prueba, desinstalen su task killer y dejen que su android haga el laburo, van a ver que van a incrementar la duración de la batería y el teléfono funcionará de maravillas.

Explicacion tecnica, no me pidan que lo traduzca!:

"---
We all know that Android uses a different way of handling processes. Instead of killing every process after its Activity ended, processes are kept until the system needs more memory. These processes usually should not harm the overall performance and should give speed improvements if you start an Activity again. That’s the idea.

But when does Android kill a process? And which process? As far as I understood android keeps a LRU (last recently used) list and starts killing the oldest unneeded process. This way it is much smarter than any of the taskkillers we see in the Market.

Android seems to group running processes into 6 different categories:

FOREGROUND_APP:
// This is the process running the current foreground app. We’d really
// rather not kill it! Value set in system/rootdir/init.rc on startup.

VISIBLE_APP:
// This is a process only hosting activities that are visible to the
// user, so we’d prefer they don’t disappear. Value set in
// system/rootdir/init.rc on startup.

SECONDARY_SERVER:
// This is a process holding a secondary server — killing it will not
// have much of an impact as far as the user is concerned. Value set in
// system/rootdir/init.rc on startup.

HIDDEN_APP:
// This is a process only hosting activities that are not visible,
// so it can be killed without any disruption. Value set in
// system/rootdir/init.rc on startup.

CONTENT_PROVIDER:
// This is a process with a content provider that does not have any clients
// attached to it. If it did have any clients, its adjustment would be the
// one for the highest-priority of those processes.

EMPTY_APP:
// This is a process without anything currently running in it. Definitely
// the first to go! Value set in system/rootdir/init.rc on startup.
// This value is initalized in the constructor, careful when refering to
// this static variable externally.

These 6 categories are reflected by 6 memory limits which are configured for the lowmemorykiller in the kernel.

--"
Otra explicacion un poco mas extensa:

------------------------------

Why You Shouldn’t Be Using a Task Killer with Android:

I see this come up over and over again. People saying that a task is running in the background and they think it is killing their battery or hogging all of their memory. So their natural reaction is to download a program made to kill tasks. Here’s the thing… you are likely doing more harm than good by killing tasks that aren’t ready to end. I was the same way when I first got my CDMA Hero. There were tons of things running that I didn’t want so I just kept killing them. After a few weeks I realized that if I stopped using a task killer (and totally uninstalled it in fact) my phone actually began to run better! The applications would close themselves and things just seemed to be running better. I get that there may be short term benefits from clearing a task, but you should still take the time to read through this.

Here is some information directory from Android’s developer page. I have put the important parts in bold. This is quite a lengthy read but honestly I think it’s important. If you want the full read then you can check out the dev page here. If you just want the quick TL;DNR version then scroll to the bottom.

".....
By default, every application runs in its own Linux process. Android starts the process when any of the application’s code needs to be executed, and shuts down the process when it’s no longer needed and system resources are required by other applications.

A content provider is active only while it’s responding to a request from a ContentResolver. And a broadcast receiver is active only while it’s responding to a broadcast message. So there’s no need to explicitly shut down these components.

Activities, on the other hand, provide the user interface. They’re in a long-running conversation with the user and may remain active, even when idle, as long as the conversation continues. Similarly, services may also remain running for a long time. So Android has methods to shut down activities and services in an orderly way:

* An activity can be shut down by calling its finish() method. One activity can shut down another activity (one it started with startActivityForResult()) by calling finishActivity().
* A service can be stopped by calling its stopSelf() method, or by calling Context.stopService().

Components might also be shut down by the system when they are no longer being used or when Android must reclaim memory for more active components.

If the user leaves a task for a long time, the system clears the task of all activities except the root activity. When the user returns to the task again, it’s as the user left it, except that only the initial activity is present. The idea is that, after a time, users will likely have abandoned what they were doing before and are returning to the task to begin something new...."

"... Activity lifecycle

An activity has essentially three states:

* It is active or running when it is in the foreground of the screen (at the top of the activity stack for the current task). This is the activity that is the focus for the user’s actions.
* It is paused if it has lost focus but is still visible to the user. That is, another activity lies on top of it and that activity either is transparent or doesn’t cover the full screen, so some of the paused activity can show through. A paused activity is completely alive (it maintains all state and member information and remains attached to the window manager), but can be killed by the system in extreme low memory situations.
* It is stopped if it is completely obscured by another activity. It still retains all state and member information. However, it is no longer visible to the user so its window is hidden and it will often be killed by the system when memory is needed elsewhere.

If an activity is paused or stopped, the system can drop it from memory either by asking it to finish (calling its finish() method), or simply killing its process. When it is displayed again to the user, it must be completely restarted and restored to its previous state.

The foreground lifetime of an activity happens between a call to onResume() until a corresponding call to onPause(). During this time, the activity is in front of all other activities on screen and is interacting with the user. An activity can frequently transition between the resumed and paused states — for example, onPause() is called when the device goes to sleep or when a new activity is started, onResume() is called when an activity result or a new intent is delivered. Therefore, the code in these two methods should be fairly lightweight..."

The following diagram illustrates these loops and the paths an activity may take between states. The colored ovals are major states the activity can be in. The square rectangles represent the callback methods you can implement to perform operations when the activity transitions between states.



So… the TL;DNR Version:

* Android is hard coded to automatically kill a task when more memory is needed.
* Android is hard coded to automatically kill a task when it’s done doing what it needs to do.
* Android is hard coded to automatically kill a task when you haven’t returned to it in a long time.
* Most services (while possibly running in the background) use very little memory when not actively doing something.
* A content provider is only doing something when there is a notification for it to give. Otherwise it uses very little memory.
* Killing a process when it isn’t ready only causes it to have to reload itself and start from scratch when it’s needed again.
* Because a task is likely running in the background for a reason, killing it will only cause it to re-spawn as soon as the activity that was using it looks for it again. And it will just have to start over again.
* Killing certain processes can have undesirable side effects. Not receiving text messages, alarms not going off, and force closes just to name a few.
* The only true way to prevent something from running at all on your phone would be to uninstall the .apk.
* Most applications will exit themselves if you get out of it by hitting “back” until it closes rather than hitting the “home” button. But even with hitting home, Android will eventually kill it once it’s been in the background for a while.



Espero que les sirva.
Si les sirvió, y mucho, entonces no me voy a molestar si me dejan unos puntitos a este novato que necesita para ser miembro vip:

http://www.taringa.net/posts/info/4613589/No-usen-Task-Killers-en-Android,-Explicacion!.html





Saludos
  • 0
  • 1Calificación
  • 2Seguidores
  • 1.811Visitas
  • 0Favoritos

9 respuestas

@dpepe80 dijo Hace más de 1 año:

Las explicaciones parecen tener logica y la verdad que probar no cuesta nada... Voy a hacer la prueba como hiciste vos de no usar el task killer por una semana y despues comento que onda.
Muchas gracias por la info!

@fgalander dijo Hace más de 1 año:

cuando NO he usado el task killer la verdad es que se pone bastante lento el telefono, mas aun con la poca cantidad de memoria RAM que tiene. Alguien tiene certeza de esto?
Esta muy buena la info, pero la verdad es que me faltan años luz de conocimiento.

Saludos

@desactivado dijo Hace más de 1 año:

fgalander dijo:

cuando NO he usado el task killer la verdad es que se pone bastante lento el telefono, mas aun con la poca cantidad de memoria RAM que tiene. Alguien tiene certeza de esto?
Esta muy buena la info, pero la verdad es que me faltan años luz de conocimiento.

Saludos



No es así... Es al pepe explicar por qué porque ya lo tenés ahí en bandeja... Pero DOY FÉ de que es absolutamente CIERTO...

Cito este párrafo que explica exactamente lo que a mí me sucedió

El hecho es que incrementé la duracion de la bateria, no se me tilda mas el phone y las aplicaciones que generalmente quedan en background son las que uso constantemente. Al rato a veces, puedo ver que el android si no la usé, la mató sola.

@javierponce dijo Hace más de 1 año:

Y que pasa si usamos el taskkiller sin tenerlo abierto siempre?
O sea, cuando dejo de usar las apps lo abro, cierro todo marcando tambien que cierre el TSK

@XJeFX dijo Hace más de 1 año:

linda explicación teorica pero en la practica no es asi...
para empezar, con el spica si tenes menos de 40mb libres de ram el reproductor de musica hace ruidos de estatica y otros... ademas que se pone lentisimo el telefono.
Mientras mas memoria ocupada hay, mas consumo de energia para mantener esos bits en memoria, por lo tanto mas consumo de bateria....
Asi que en conclusion, es puro cuento.
Hay que usar gestores de aplicaciones, si no usas determinado programa no tiene por que estar abierto consumiendo energia ni alentando el sistema.

@oOoPioneeRoOo dijo Hace más de 1 año:

yo uso pero las aplicaciones q no kiero que se cierren como los live walpaper o el lock bot los pongo ignorar..

@XJeFX dijo Hace más de 1 año:

si quieren tener el cel estable cierren todo pero agreguen mensajeria y demas programas basicos en la lista de excepciones para que no los cierre... todos los demas programas los pueden cerrar sin problemas.

@Googleman dijo Hace más de 9 meses:

tiene razon. anoche deje toda la noche prendido una noche que decidí dejar ulgunas aplicaciones encendidas ya que antes había visto en la configuracion de la bateria que la inutilizacion de la bateria consumía bateria. Me parecio muy raro eso pero esa noche solo deje facebook, apndroid y los mensajes abiertos y me duro mas la bateria. saludos

Tienes que ser miembro para responder en este tema