android-developers
[Arriba] [Todas las Listas]

Re: [android-developers] Re: La Memoria no es reclaimed bastante rápido

To: android-developers@xxxxxxxxxxxxxxxx
Subject: Re: [android-developers] Re: La Memoria no es reclaimed bastante rápido cuándo la Actividad es cerrada
From: Mark Murphy <mmurphy@xxxxxxxxxxxxxxx>
Date: Mon, 31 Oct 2011 16:17:20 -0400
Delivery-date: Mon, 31 Oct 2011 16:18:11 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:in-reply-to:references:from :date:message-id:subject:to:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=ekYNiJvE2n0KaGP3pgrJQthwk286DmtsplXWG1TSqb4=; b=Bdd4VKQUxdAqzUjmcO8H80P2rq1iYUb7pd/u6W+166o9KFIm2OtSPG8P3LY7Z1uOl7 gzQkdVeLbiUDeJCGncEEQhliYDVBwTGLd7ztQ7e90q4nFZd7+3xmZf1H2PCV7ybUoUw0 2MPJVsNvehc0auy0Kz3CdJGOgl9mxGW3x6zw4=
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <32197a97-f08b-4f5e-8f40-90a50062e1bf@x20g2000vbl.googlegroups.com>
List-archive: <http://groups.google.com/group/android-developers?hl=en_US>
List-help: <http://groups.google.com/support/?hl=en_US>, <mailto:android-developers+help@googlegroups.com>
List-id: <android-developers.googlegroups.com>
List-post: <http://groups.google.com/group/android-developers/post?hl=en_US>, <mailto:android-developers@googlegroups.com>
List-subscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+subscribe@googlegroups.com>
List-unsubscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+unsubscribe@googlegroups.com>
Mailing-list: list android-developers@xxxxxxxxxxxxxxxx; contact android-developers+owners@xxxxxxxxxxxxxxxx
References: <d929d42b-b18c-47df-b99c-fe6865f5092c@eh5g2000vbb.googlegroups.com> <CALLdnhPfKLEeg_za7pmtXvqkRxZo75GLAGoN+mKKqcj_gKa3uA@mail.gmail.com> <32197a97-f08b-4f5e-8f40-90a50062e1bf@x20g2000vbl.googlegroups.com>
Reply-to: android-developers@xxxxxxxxxxxxxxxx
Sender: android-developers@xxxxxxxxxxxxxxxx
En *Mon, *Oct 31, 2011 en 3:51 PM, *Efi *Merdler-*Kravitz
<efi.merdler@xxxxxxxxx> escribió:
> El problema más grande es la imagen sola que estoy intentando cargar, es
> #uno 250*K *gif imagen que consigue *inflated a casi 11MB.
>
> Cómo  sugieres bajar este número?

Uno se acerca sería para utilizar una imagen de resolución baja.

> *BTW Por qué las imágenes consiguen *inflated tanto cuándo cargado a la memoria ?

imágenes de GIF utilizan un *technique sabido como "compresión", cuando hacer *JPEGs, *PNGs,
vídeos de MPEG, MP3 y *OGG archivos de audio, *etc. A *render la imagen, necesita ser *decompressed. "250*K" es un *meaningless valor cuándo viene
a medir consumo de memoria.

*Heap El Uso es una reflexión del número de *pixels (resolución) y la profundidad
de bit de cada *pixel (*RGB_565 es 2 *bytes/*pixel; *RGB_888 es 3
*bytes/*pixel). Incluso si suponemos que estás utilizando *RGB_888, 11MB todavía
requeriría más *pixels que #uno 1080*p exhibición (1920*x1080*x3 es sobre
6MB). Aquello sugiere que quizás estás utilizando una imagen mucha demasiado grande.

-- 
Mark *Murphy (un *Commons Guy)
*http://*commonsware.*com | *http://*github.*com/*commonsguy
*http://*commonsware.*com/*blog | *http://*twitter.*com/*commonsguy

_*Android Programación *Tutorials_ Versión 4.0 Disponible!

-- 
Recibiste este mensaje porque eres *subscribed al *Google
Grupos "*Android *Developers" grupo.
A correo a este grupo, envía *email a *android-developers@xxxxxxxxxxxxxxxx
A *unsubscribe de este grupo, envía *email a *android-*developers+unsubscribe@xxxxxxxxxxxxxxxx

Puesto que más opciones, visita este grupo en
*http://grupos.*google.*com/Grupo/*android-*developers?*hl=*en

On Mon, Oct 31, 2011 at 3:51 PM, Efi Merdler-Kravitz
<efi.merdler@xxxxxxxxx> wrote:
> The biggest problem is the single image that I'm trying to load, it's
> a 250K gif image that gets inflated to almost 11MB.
>
> How would you suggest lowering this number?

One approach would be to use a lower-resolution image.

> BTW why images get inflated so much when loaded into the memory ?

GIF images use a technique known as "compression", as do JPEGs, PNGs,
MPEG videos, MP3 and OGG audio files, etc. To render the image, it
needs to be decompressed. "250K" is a meaningless value when it comes
to measuring memory consumption.

Heap usage is a reflection of the number of pixels (resolution) and
the bit depth of each pixel (RGB_565 is 2 bytes/pixel; RGB_888 is 3
bytes/pixel). Even if we assume that you are using RGB_888, 11MB would
still require more pixels than a 1080p display (1920x1080x3 is about
6MB). That suggests that you are perhaps using a much too large image.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 4.0 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
android-developers+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<Anterior por Tema] Tema Actual [Siguiente por Tema>