Blame optimization-guide/es/es.po

Packit 1470ea
# translation of gnome-devel-docs.optimization-guide.master.po to Español
Packit 1470ea
# Spanish translation for gnome-devel-docs.
Packit 1470ea
# Copyright (C) 2009 gnome-devel-docs's COPYRIGHT HOLDER
Packit 1470ea
# This file is distributed under the same license as the gnome-devel-docs package.
Packit 1470ea
# Jorge González <jorgegonz@svn.gnome.org>, 2009, 2010.
Packit 1470ea
# Daniel Mustieles <daniel.mustieles@gmail.com>, 2011-2015.
Packit 1470ea
#
Packit 1470ea
msgid ""
Packit 1470ea
msgstr ""
Packit 1470ea
"Project-Id-Version: gnome-devel-docs.optimization-guide.master\n"
Packit 1470ea
"Report-Msgid-Bugs-To: \n"
Packit 1470ea
"POT-Creation-Date: 2015-11-15 20:47+0000\n"
Packit 1470ea
"PO-Revision-Date: 2015-11-17 09:21+0100\n"
Packit 1470ea
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
Packit 1470ea
"Language-Team: Español; Castellano <gnome-es-list@gnome.org>\n"
Packit 1470ea
"Language: \n"
Packit 1470ea
"MIME-Version: 1.0\n"
Packit 1470ea
"Content-Type: text/plain; charset=UTF-8\n"
Packit 1470ea
"Content-Transfer-Encoding: 8bit\n"
Packit 1470ea
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
Packit 1470ea
"X-Generator: Gtranslator 2.91.6\n"
Packit 1470ea
Packit 1470ea
#. Put one translator per line, in the form NAME <EMAIL>, YEAR1, YEAR2
Packit 1470ea
msgctxt "_"
Packit 1470ea
msgid "translator-credits"
Packit 1470ea
msgstr ""
Packit 1470ea
"Daniel Mustieles <daniel.mustieles@gmail.com>, 2012 - 2015\n"
Packit 1470ea
"Jorge González <jorgegonz@svn.gnome.org>, 2009-2010"
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/title
Packit 1470ea
#: C/harmful.page:7
Packit 1470ea
msgid "Disk Seeks Considered Harmful"
Packit 1470ea
msgstr "Búsquedas de disco consideradas dañinas"
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/p
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/harmful.page:8 C/index.page:54
Packit 1470ea
msgid ""
Packit 1470ea
"Disk seeks are one of the most expensive operations you can possibly "
Packit 1470ea
"perform. You might not know this from looking at how many of them we "
Packit 1470ea
"perform, but trust me, they are. Consequently, please refrain from the "
Packit 1470ea
"following suboptimal behavior:"
Packit 1470ea
msgstr ""
Packit 1470ea
"Las búsquedas de disco son una de las operaciones más caras que puede "
Packit 1470ea
"realizar. Puede que no sepa esto simplemente mirando cuántas se realizan, "
Packit 1470ea
"pero crea que realmente lo son. Por ello, evite los siguientes "
Packit 1470ea
"comportamientos:"
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:13
Packit 1470ea
msgid "Placing lots of small files all over the disk."
Packit 1470ea
msgstr "Ubicar montones de pequeños archivos por todo el disco."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:18
Packit 1470ea
msgid "Opening, stating, and reading lots of files all over the disk"
Packit 1470ea
msgstr "Abrir, iniciar y leer montones de archivos por todo el disco."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:23
Packit 1470ea
msgid ""
Packit 1470ea
"Doing the above on files that are laid out at different times, so as to "
Packit 1470ea
"ensure that they are fragmented and cause even more seeking."
Packit 1470ea
msgstr ""
Packit 1470ea
"Realizar lo anterior sobre archivos que se abren en diferentes momentos, "
Packit 1470ea
"para asegurarse de que están fragmentados y causan aún más búsqueda del "
Packit 1470ea
"disco."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:28
Packit 1470ea
msgid ""
Packit 1470ea
"Doing the above on files that are in different directories, so as to ensure "
Packit 1470ea
"that they are in different cylinder groups and cause even more seeking."
Packit 1470ea
msgstr ""
Packit 1470ea
"Realizar lo siguiente sobre archivos que están en diferentes carpetas, para "
Packit 1470ea
"asegurarse de que están en grupos de cilindros diferentes y pueden causar "
Packit 1470ea
"incluso más búsqueda."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:33
Packit 1470ea
msgid "Repeatedly doing the above when it only needs to be done once."
Packit 1470ea
msgstr ""
Packit 1470ea
"Realizar repetidamente lo anterior cuando sólo se necesita realizar una vez."
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/p
Packit 1470ea
#: C/harmful.page:38
Packit 1470ea
msgid "Ways in which you can optimize your code to be seek-friendly:"
Packit 1470ea
msgstr ""
Packit 1470ea
"Formas en las que puede optimizar su código para que sea amigable a la hora "
Packit 1470ea
"de hacer búsquedas:"
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:43
Packit 1470ea
msgid "Consolidate data into a single file."
Packit 1470ea
msgstr "Consolidar los datos en un solo archivo."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:48
Packit 1470ea
msgid "Keep data together in the same directory."
Packit 1470ea
msgstr "Mantener los datos juntos en la mismo carpeta."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:53
Packit 1470ea
msgid "Cache data so as to not need to reread constantly."
Packit 1470ea
msgstr "Cachear los datos para no tener que volver a leerlos constantemente."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:58
Packit 1470ea
msgid ""
Packit 1470ea
"Share data so as not to have to reread it from disk when each application "
Packit 1470ea
"loads."
Packit 1470ea
msgstr ""
Packit 1470ea
"Compartir los datos para no tener que volver a leerlos del disco cada vez "
Packit 1470ea
"que una aplicación se carga."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/harmful.page:63
Packit 1470ea
msgid ""
Packit 1470ea
"Consider caching all of the data in a single binary file that is properly "
Packit 1470ea
"aligned and can be mmaped."
Packit 1470ea
msgstr ""
Packit 1470ea
"Considerar cachear todos los datos en un archivo binario único que está "
Packit 1470ea
"alineado apropiadamente y se puede mapear."
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/p
Packit 1470ea
#: C/harmful.page:68
Packit 1470ea
msgid ""
Packit 1470ea
"The trouble with disk seeks are compounded for reads, which is unfortunately "
Packit 1470ea
"what we are doing. Remember, reads are generally synchronous while writes "
Packit 1470ea
"are asynchronous. This only compounds the problem, serializing each read, "
Packit 1470ea
"and contributing to program latency."
Packit 1470ea
msgstr ""
Packit 1470ea
"El problema de las búsquedas en los discos se complica para las lecturas, "
Packit 1470ea
"que es desafortunadamente lo que se busca. Recuerde, las lecturas son "
Packit 1470ea
"generalmente síncronas mientras que las escrituras son asíncronas. Esto sólo "
Packit 1470ea
"complica el problema, serializando cada lectura y contribuyendo a la "
Packit 1470ea
"latencia del programa."
Packit 1470ea
Packit 1470ea
#. (itstool) path: license/p
Packit 1470ea
#: C/index.page:7
Packit 1470ea
#| msgid ""
Packit 1470ea
#| "Permission is granted to copy, distribute and/or modify this document "
Packit 1470ea
#| "under the terms of the GNU Free Documentation License, Version 1.1 or any "
Packit 1470ea
#| "later version published by the Free Software Foundation with no Invariant "
Packit 1470ea
#| "Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a "
Packit 1470ea
#| "copy of the GNU Free Documentation License from the Free Software "
Packit 1470ea
#| "Foundation by visiting <link href=\"http://www.fsf.org\">their Web site</"
Packit 1470ea
#| "link> or by writing to: Free Software Foundation, Inc., 59 Temple Place - "
Packit 1470ea
#| "Suite 330, Boston, MA 02111-1307, USA."
Packit 1470ea
msgid ""
Packit 1470ea
"Permission is granted to copy, distribute and/or modify this document under "
Packit 1470ea
"the terms of the GNU Free Documentation License, Version 1.1 or any later "
Packit 1470ea
"version published by the Free Software Foundation with no Invariant "
Packit 1470ea
"Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a "
Packit 1470ea
"copy of the GNU Free Documentation License from the Free Software Foundation "
Packit 1470ea
"by visiting <link href=\"http://www.fsf.org\">their Web site</link> or by "
Packit 1470ea
"writing to: Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor "
Packit 1470ea
"Boston, MA 02110-1335, USA."
Packit 1470ea
msgstr ""
Packit 1470ea
"Se otorga permiso para copiar, distribuir y/o modificar este documento bajo "
Packit 1470ea
"los términos de la Licencia de Documentación Libre de GNU, Versión 1.1 o "
Packit 1470ea
"cualquier otra versión posterior publicada por la Free Software Foundation; "
Packit 1470ea
"sin Secciones Invariantes ni Textos de Cubierta Delantera ni Textos de "
Packit 1470ea
"Cubierta Trasera. Puede encontrar una copia de la licencia Licencia de "
Packit 1470ea
"Documentación Libre de GNU de la Free Software Foundation visitando 
Packit 1470ea
"href=\"http://www.fsf.org\">su página web</link> o escribiendo a: Free "
Packit 1470ea
"Software Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA "
Packit 1470ea
"02110-1335, USA."
Packit 1470ea
Packit 1470ea
#. (itstool) path: license/p
Packit 1470ea
#: C/index.page:16
Packit 1470ea
msgid ""
Packit 1470ea
"Many of the names used by companies to distinguish their products and "
Packit 1470ea
"services are claimed as trademarks. Where those names appear in any GNOME "
Packit 1470ea
"documentation, and those trademarks are made aware to the members of the "
Packit 1470ea
"GNOME Documentation Project, the names have been printed in caps or initial "
Packit 1470ea
"caps."
Packit 1470ea
msgstr ""
Packit 1470ea
"Muchos de los nombres usados por compañías para distinguir sus productos y "
Packit 1470ea
"servicios se mencionan como marcas comerciales. Donde aparezcan dichos "
Packit 1470ea
"nombres en cualquier documentación GNOME, y para que los miembros del "
Packit 1470ea
"proyecto de documentación las reconozcan dichas marcas comerciales, dichos "
Packit 1470ea
"nombres se imprimen en mayúsculas o iniciales mayúsculas."
Packit 1470ea
Packit 1470ea
#. (itstool) path: credit/years
Packit 1470ea
#: C/index.page:24 C/index.page:28
Packit 1470ea
msgid "2004-2005"
Packit 1470ea
msgstr "2004-2005"
Packit 1470ea
Packit 1470ea
#. (itstool) path: credit/name
Packit 1470ea
#: C/index.page:25
Packit 1470ea
msgid "Callum McKenzie"
Packit 1470ea
msgstr "Callum McKenzie"
Packit 1470ea
Packit 1470ea
#. (itstool) path: credit/name
Packit 1470ea
#: C/index.page:29
Packit 1470ea
msgid "Robert Love"
Packit 1470ea
msgstr "Robert Love"
Packit 1470ea
Packit 1470ea
#. (itstool) path: info/desc
Packit 1470ea
#: C/index.page:32
Packit 1470ea
msgid ""
Packit 1470ea
"Software can be optimized in many ways: for speed, program size, or memory "
Packit 1470ea
"use. This section contains guides and tutorials for optimizing your software."
Packit 1470ea
msgstr ""
Packit 1470ea
"El software se puede optimizar de muchas formas: para mayor velocidad, "
Packit 1470ea
"tamaño del programa o uso de memoria. Esta sección contiene guías y "
Packit 1470ea
"tutoriales para optimizar su software."
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/title
Packit 1470ea
#: C/index.page:35
Packit 1470ea
msgid "Optimization Guide"
Packit 1470ea
msgstr "Guía de optimización"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/index.page:38 C/massif.page:12
Packit 1470ea
msgid "Introduction"
Packit 1470ea
msgstr "Introducción"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/index.page:39
Packit 1470ea
#| msgid ""
Packit 1470ea
#| "This is a brief introduction to optimization, both the hows and thewhys. "
Packit 1470ea
#| "Details of individual tools and techniques are left for later articles, "
Packit 1470ea
#| "but a collection of hints and tricks is provided."
Packit 1470ea
msgid ""
Packit 1470ea
"This is a brief introduction to optimization, both the hows and the whys. "
Packit 1470ea
"Details of individual tools and techniques are left for later articles, but "
Packit 1470ea
"a collection of hints and tricks is provided."
Packit 1470ea
msgstr ""
Packit 1470ea
"Esta es una breve introducción a la optimización, tanto de los «cómos» como "
Packit 1470ea
"de los «porqués». Se dejan para posteriores artículos los detalles de "
Packit 1470ea
"herramientas y técnicas individuales pero se proporciona una colección de "
Packit 1470ea
"sugerencias y trucos."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/index.page:45
Packit 1470ea
msgid "Massif"
Packit 1470ea
msgstr "Massif"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#. (itstool) path: page/p
Packit 1470ea
#: C/index.page:46 C/massif.page:9
Packit 1470ea
msgid ""
Packit 1470ea
"This article describes how to use the <app>Massif</app> heap profiler with "
Packit 1470ea
"GNOME applications. We describe how to invoke, interpret, and act on the "
Packit 1470ea
"output of <app>Massif</app>. The <app>Swell Foop</app> game is used as an "
Packit 1470ea
"example."
Packit 1470ea
msgstr ""
Packit 1470ea
"Este artículo describe cómo usar el perfilador <app>Massif</app> con las "
Packit 1470ea
"aplicaciones de GNOME. Describe cómo invocar, interpretar y actuar sobre la "
Packit 1470ea
"salida de <app>Massif</app>. Se usa el juego <app>Swell Foop</app> como "
Packit 1470ea
"ejemplo."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/index.page:53
Packit 1470ea
msgid "Harmfulness"
Packit 1470ea
msgstr "Nocividad"
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/title
Packit 1470ea
#: C/introduction.page:7
Packit 1470ea
msgid "What are we Optimizing?"
Packit 1470ea
msgstr "¿Qué se está optimizando?"
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/p
Packit 1470ea
#: C/introduction.page:8
Packit 1470ea
msgid ""
Packit 1470ea
"When we optimize for GNOME the first thing to remember is this: we are not "
Packit 1470ea
"trying to make the program better, we are trying to make the person using "
Packit 1470ea
"the computer happier."
Packit 1470ea
msgstr ""
Packit 1470ea
"Al optimizar GNOME lo primero que hay que recordar es esto: no se está "
Packit 1470ea
"intentando mejorar el programa, se está intentando hacer que las personas "
Packit 1470ea
"usen el equipo más felices."
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/p
Packit 1470ea
#: C/introduction.page:10
Packit 1470ea
msgid ""
Packit 1470ea
"Better programs make people happier, but there are some improvements that "
Packit 1470ea
"will make them a lot happier than others: Responsiveness, start-up time, "
Packit 1470ea
"easy to access commands and not having the computer go into swap the moment "
Packit 1470ea
"more than two programs are open."
Packit 1470ea
msgstr ""
Packit 1470ea
"Programas mejores hacen a la gente más feliz pero existen algunas mejoras "
Packit 1470ea
"que los harán más felices que otras: tiempo de respuesta, tiempo de inicio, "
Packit 1470ea
"facilidad para acceder a comandos y que el equipo no tenga que usar la "
Packit 1470ea
"memoria de intercambio cuando más de dos programas estén abiertos."
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/p
Packit 1470ea
#: C/introduction.page:13
Packit 1470ea
msgid ""
Packit 1470ea
"Traditional optimization tackles concepts like CPU use, code size, the "
Packit 1470ea
"number of mouse clicks and the memory use of the program. This second list "
Packit 1470ea
"has been chosen to correlate with the first list, however there is an "
Packit 1470ea
"important difference: The person using GNOME doesn't care about the second "
Packit 1470ea
"list, but they care a lot about the first list. When optimizing GNOME "
Packit 1470ea
"programs we will reduce CPU use, memory use and all those things, but these "
Packit 1470ea
"are the means to the end, not the final goal. We are optimizing for people."
Packit 1470ea
msgstr ""
Packit 1470ea
"La optimización tradicional contempla conceptos como el uso de CPI, el "
Packit 1470ea
"tamaño del código, el número de pulsaciones del ratón y el uso de memoria de "
Packit 1470ea
"programa. Se ha elegido esta segunda lista para correlar con la primera, no "
Packit 1470ea
"obstante existe una diferencia importante. A la persona que usa GNOME no le "
Packit 1470ea
"importa la segunda lista, pero sí la primera. Al optimizar los programas de "
Packit 1470ea
"GNOME se reducirá el uso de CPU, el uso de memoria y todo aquello, pero son "
Packit 1470ea
"conceptos para el fin, no el objetivo final. Se optimiza para las personas."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/introduction.page:18
Packit 1470ea
msgid "Doing the Optimization"
Packit 1470ea
msgstr "Realizar la optimización"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/introduction.page:19
Packit 1470ea
msgid ""
Packit 1470ea
"The previous section omitted one important qualifier: To optimize something "
Packit 1470ea
"it has to be measurable. You can't measure happiness. However, you can "
Packit 1470ea
"measure start-up time so you can tell if you have improved it. Happiness "
Packit 1470ea
"will then, hopefully, follow."
Packit 1470ea
msgstr ""
Packit 1470ea
"En la sección anterior se omitió un calificador importante: optimizar algo "
Packit 1470ea
"debe ser medible. No se puede medir la felicidad. No obstante se puede medir "
Packit 1470ea
"el tiempo de inicio de un programa para saber si se ha mejorado. La "
Packit 1470ea
"felicidad del usuario aumentará pues."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/introduction.page:22
Packit 1470ea
msgid ""
Packit 1470ea
"Optimization is the process of measurement, refinement and re-measurement. "
Packit 1470ea
"So the first thing you must do is find a way to measure what you are "
Packit 1470ea
"optimizing. Ideally this measurement is a single number, for example: the "
Packit 1470ea
"time taken to perform a task. This is your benchmark, it is the only way to "
Packit 1470ea
"tell if you are winning or losing. There is a big difference between a "
Packit 1470ea
"program that should be fast and a program that is fast."
Packit 1470ea
msgstr ""
Packit 1470ea
"La optimización es el proceso de medida, refinamiento y remedida. Lo primero "
Packit 1470ea
"que debe hacer es encontrar una forma de medir lo que está optimizando. "
Packit 1470ea
"Idealmente la medida es un simple número, por ejemplo: el tiempo que se "
Packit 1470ea
"tarda en realizar una tarea. Esta es su prueba, es la única forma de saber "
Packit 1470ea
"si está ganando o perdiendo. Existe una gran diferencia entre un programa "
Packit 1470ea
"que debería ser rápido y un programa que es rápido."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/introduction.page:25
Packit 1470ea
msgid ""
Packit 1470ea
"Once you have a basic benchmark you need to find out why your code is not "
Packit 1470ea
"doing as well as it should. It is tempting to do this by inspection: just "
Packit 1470ea
"looking at the code and trying to spot something that looks like it needs "
Packit 1470ea
"improvement. You will invariably be wrong. Using a profiler to get a "
Packit 1470ea
"detailed break-down of what your program really does is the only way to be "
Packit 1470ea
"sure."
Packit 1470ea
msgstr ""
Packit 1470ea
"Una vez que tiene una prueba de rendimiento básica debe encontrar por qué su "
Packit 1470ea
"código no lo está haciendo tan bien como debería. Es tentador hacerlo "
Packit 1470ea
"inspeccionando: simplemente mirar el código y tratar de encontrar algo que "
Packit 1470ea
"parece que necesita una mejora. Estará perdiendo el tiempo, Usar un "
Packit 1470ea
"perfilador para obtener una lista detallada de lo que su programa está "
Packit 1470ea
"haciendo es, realmente, la única forma de estar seguro."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/introduction.page:28
Packit 1470ea
msgid ""
Packit 1470ea
"Usually the problem is isolated to small sections of code. Pick the worst "
Packit 1470ea
"place and concentrate on that first. Once that is done, rerun the profiler "
Packit 1470ea
"and repeat. As you proceed the gains made at each step will get less and "
Packit 1470ea
"less, at some point you will have to decide that the results are good "
Packit 1470ea
"enough. If your efforts are only extracting 10% improvements then you are "
Packit 1470ea
"well past the point where you should have stopped."
Packit 1470ea
msgstr ""
Packit 1470ea
"Generalmente el problema está aislado en pequeñas partes del código. Elija "
Packit 1470ea
"la peor parte y concéntrese en ella primero. Una vez que lo haya hecho, "
Packit 1470ea
"vuelva al perfilador y repita el proceso. Según proceda, las mejoras "
Packit 1470ea
"obtenidas en cada paso se harán cada vez más pequeñas, en algún punto tendrá "
Packit 1470ea
"que decidir que los resultados son suficientes. Si sus esfuerzos sólo están "
Packit 1470ea
"obteniendo un 10% de mejoras entonces hace tiempo que pasó el punto en el "
Packit 1470ea
"que debería haber parado."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/introduction.page:31
Packit 1470ea
msgid ""
Packit 1470ea
"Don't forget the big picture. For example, rather than just trying to speed "
Packit 1470ea
"up a piece of code, ask yourself if it needs to be run at all. Could it be "
Packit 1470ea
"combined with another piece of code? Can the results of previous "
Packit 1470ea
"calculations be saved and reused? It won't even need to be optimized if it "
Packit 1470ea
"is in a place where the user is never going to notice it. Worse still, the "
Packit 1470ea
"code may already be optimized and is doing the heavy calculations now to "
Packit 1470ea
"avoid doing them later. Code does not run in isolation and neither does the "
Packit 1470ea
"optimization process."
Packit 1470ea
msgstr ""
Packit 1470ea
"No se olvide del objetivo final. Por ejemplo, en lugar de intentar mejorar "
Packit 1470ea
"un trozo de código, pregúntese si realmente se necesita ejecutar ese código. "
Packit 1470ea
"¿Se podría combinar con otro trozo de código? ¿Se pueden guardar y reusar "
Packit 1470ea
"cálculos previos? No necesitará optimizarse si está en un lugar donde el "
Packit 1470ea
"usuario no lo va a notar. O aún peor, el código puede ya estar optimizado y "
Packit 1470ea
"está haciendo cálculos pesados ahora para evitar hacerlos luego. El código "
Packit 1470ea
"no se ejecuta aisladamente ni tampoco lo hace el proceso de optimización."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/introduction.page:37
Packit 1470ea
msgid "Hints"
Packit 1470ea
msgstr "Sugerencias"
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/title
Packit 1470ea
#: C/introduction.page:41
Packit 1470ea
msgid "The Fundamentals"
Packit 1470ea
msgstr "Lo fundamental"
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:44
Packit 1470ea
msgid ""
Packit 1470ea
"Re-run your benchmark after every change you make to the code and keep a log "
Packit 1470ea
"of everything you change and how it affects the benchmark. This lets you "
Packit 1470ea
"undo mistakes and also helps you not to repeat mistakes."
Packit 1470ea
msgstr ""
Packit 1470ea
"Vuelva a ejecutar su prueba de rendimiento después de cada cambio que "
Packit 1470ea
"realice sobre el código y mantenga un registro de todo lo que cambia y de "
Packit 1470ea
"cómo afecta al rendimiento. Esto le permite deshacer errores y también le "
Packit 1470ea
"ayuda a no repetirlos."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:49
Packit 1470ea
msgid ""
Packit 1470ea
"Make sure your code is correct and bug-free before optimizing it. Check that "
Packit 1470ea
"it remains correct and bug-free after optimization."
Packit 1470ea
msgstr ""
Packit 1470ea
"Asegúrese de que su código es correcto y está libre de errores antes de "
Packit 1470ea
"optimizarlo. Compruebe que permanece correcto y libre de errores después de "
Packit 1470ea
"haberlo optimizado."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:54
Packit 1470ea
msgid "Optimize at the high level before optimizing the details."
Packit 1470ea
msgstr "Optimizar al nivel más alto antes de optimizar los detalles."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:59
Packit 1470ea
msgid ""
Packit 1470ea
"Use the right algorithm. The classic text-book example is using quick-sort "
Packit 1470ea
"instead of bubble-sort. There are many others, some save memory, some save "
Packit 1470ea
"CPU. Also, see what shortcuts you can make: you can do quicker than quick-"
Packit 1470ea
"sort if you are prepared to make some compromises."
Packit 1470ea
msgstr ""
Packit 1470ea
"Usar el algoritmo correcto. El clásico ejemplo de libro de texto es usar "
Packit 1470ea
"ordenación rápida en lugar de ordenación de burbuja. Existen muchos otros, "
Packit 1470ea
"algunos ahorran memoria, algunos ahorran CPU. También debe ver qué atajos de "
Packit 1470ea
"teclado puede crear: puede hacerlo más rápido que una ordenación rápida si "
Packit 1470ea
"está preparado para tomar ciertos compromisos."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:64
Packit 1470ea
msgid ""
Packit 1470ea
"Optimization is a trade-off. Caching results speeds up calculations, but "
Packit 1470ea
"increases memory use. Saving data to disk saves memory, but costs time when "
Packit 1470ea
"it is loaded back from disk."
Packit 1470ea
msgstr ""
Packit 1470ea
"La optimización es intercambio. Obtener resultados mejora los cálculos pero "
Packit 1470ea
"aumenta la memoria en uso. Guardar datos al disco ahorra memoria pero cuesta "
Packit 1470ea
"tiempo al cargarlos de nuevo desde el disco."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:69
Packit 1470ea
msgid ""
Packit 1470ea
"Make sure you choose a wide variety of inputs to optimize against. If you "
Packit 1470ea
"don't it is easy to end up with a piece of code carefully optimized for one "
Packit 1470ea
"file and no others."
Packit 1470ea
msgstr ""
Packit 1470ea
"Asegúrese de elegir cierta variedad de entradas que optimizar. Si no lo hace "
Packit 1470ea
"es fácil que termine con un trozo de código cuidadosamente optimizado para "
Packit 1470ea
"un campo y no para otros."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:74
Packit 1470ea
msgid ""
Packit 1470ea
"Avoid expensive operations: Multiple small disk reads. Using up lots of "
Packit 1470ea
"memory so disk swapping becomes necessary. Avoid anything that writes or "
Packit 1470ea
"reads from the hard disk unnecessarily. The network is slow too. Also avoid "
Packit 1470ea
"graphics operations that need a response from the X server."
Packit 1470ea
msgstr ""
Packit 1470ea
"Evite las operaciones caras: múltiples lecturas de disco pequeñas. Use un "
Packit 1470ea
"montón de memoria para que el área de intercambio («swap») se haga "
Packit 1470ea
"innecesario. Evite cualquier cosa que escriba o lea innecesariamente del "
Packit 1470ea
"disco. La red también es lenta. Evite también operaciones gráficas que "
Packit 1470ea
"necesitan una respuesta del servidor X."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/title
Packit 1470ea
#: C/introduction.page:81
Packit 1470ea
msgid "Traps for the Unwary"
Packit 1470ea
msgstr "Trampas para los imprudentes"
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:84
Packit 1470ea
msgid ""
Packit 1470ea
"Beware of side effects. There can often be strange interactions between "
Packit 1470ea
"different sections of code, a speed-up in one part can slow another part "
Packit 1470ea
"down."
Packit 1470ea
msgstr ""
Packit 1470ea
"Esté atento a efectos laterales. Generalmente son interacciones extrañas "
Packit 1470ea
"entre diferentes secciones del código, una extensión de una parte puede "
Packit 1470ea
"retardar otra."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:89
Packit 1470ea
msgid ""
Packit 1470ea
"When timing code, even on a quiet system, events outside the program add "
Packit 1470ea
"noise to the timing results. Average over multiple runs. If the code is very "
Packit 1470ea
"short, timer resolution is also a problem. In this case measure the time the "
Packit 1470ea
"computer takes to run the code 100 or 1000 times. If the times you are "
Packit 1470ea
"recording are longer than a few seconds, you should be OK."
Packit 1470ea
msgstr ""
Packit 1470ea
"Al cronometrar el tiempo del código, incluso en un sistema silencioso, los "
Packit 1470ea
"eventos fuera del programa añaden ruido a los resultados del tiempo. Haga la "
Packit 1470ea
"media sobre múltiples ejecuciones. Si el código es muy pequeño la resolución "
Packit 1470ea
"del tiempo también es un problema. En este caso mida el tiempo que el equipo "
Packit 1470ea
"tarda en ejecutar el código 100 o 1000 veces. Si los tiempos que está "
Packit 1470ea
"obteniendo son algo superiores a unos pocos segundos todo debería estar "
Packit 1470ea
"correcto."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:94
Packit 1470ea
msgid ""
Packit 1470ea
"It is very easy to be misled by the profiler. There are stories of people "
Packit 1470ea
"optimizing the operating system idle-loop because that is where it spent all "
Packit 1470ea
"its time! Don't optimize code that does nothing the user cares about."
Packit 1470ea
msgstr ""
Packit 1470ea
"Es muy fácil perderse con el perfilador. Existen historias de programadores "
Packit 1470ea
"optimizando el bucle de inactividad porque es donde se perdía todo su "
Packit 1470ea
"tiempo. No optimice código del que el usuario no se preocupe."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:99
Packit 1470ea
msgid ""
Packit 1470ea
"Remember the resources on the X server. Your program's memory usage doesn't "
Packit 1470ea
"include the pixmaps that are stored in the X server's process, but they are "
Packit 1470ea
"still using up memory. Use xrestop to see what resources your program is "
Packit 1470ea
"using."
Packit 1470ea
msgstr ""
Packit 1470ea
"Recuerde los resultados del servidor X. El uso de memoria de su programa no "
Packit 1470ea
"incluye los pixmaps almacenados en los procesos del servidor X, pero aún "
Packit 1470ea
"siguen usando memoria. Use xrestop para ver los recursos que está usando su "
Packit 1470ea
"programa."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/title
Packit 1470ea
#: C/introduction.page:106
Packit 1470ea
msgid "Low Level Hints"
Packit 1470ea
msgstr "Consejos de bajo nivel"
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:109
Packit 1470ea
msgid ""
Packit 1470ea
"When optimizing memory use, be wary of the difference between peak usage and "
Packit 1470ea
"average memory usage. Some memory is almost always allocated, this is "
Packit 1470ea
"usually bad. Some is only briefly allocated, this may be quite acceptable. "
Packit 1470ea
"Tools like massif use the concept of space-time, the product of memory used "
Packit 1470ea
"and the duration it was allocated for, instead."
Packit 1470ea
msgstr ""
Packit 1470ea
"Al optimizar el uso de memoria considere la diferencia entre el uso de pico "
Packit 1470ea
"y el uso medio de memoria. Alguna memoria siempre está reservada, esto "
Packit 1470ea
"generalmente es malo. Alguna está temporalmente reservada, esto puede ser "
Packit 1470ea
"aceptable. Herramientas como massif usan el concepto de espacio-tiempo, el "
Packit 1470ea
"producto de la memoria usada y el tiempo durante el que estuvo reservada."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:114
Packit 1470ea
msgid ""
Packit 1470ea
"Time simplified bits of code that do only the things you know are essential, "
Packit 1470ea
"this gives an absolute lower limit on the time your code will take. For "
Packit 1470ea
"example, when optimizing a loop time the empty loop. If that is still too "
Packit 1470ea
"long no amount of micro-optimization will help and you will have to change "
Packit 1470ea
"your design. Make sure the compiler doesn't optimize away your empty loop."
Packit 1470ea
msgstr ""
Packit 1470ea
"Controle el tiempo de trozos de código simplificados que sólo hacen cosas "
Packit 1470ea
"esenciales, esto proporciona un límite absoluto inferior en el tiempo que "
Packit 1470ea
"usará el código. Por ejemplo, al optimizar un bucle, controle el tiempo del "
Packit 1470ea
"bucle vacío. Si aún es mucho tiempo cualquier intento de optimización no "
Packit 1470ea
"ayudará y deberá cambiar su diseño. Asegúrese de que el compilador no "
Packit 1470ea
"desoptimiza el bucle vacío."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:119
Packit 1470ea
msgid ""
Packit 1470ea
"Move code out from inside loops. A slightly more complicated piece of code "
Packit 1470ea
"that is executed once is far quicker than a simple piece of code executed a "
Packit 1470ea
"thousand times. Avoid calling slow code often."
Packit 1470ea
msgstr ""
Packit 1470ea
"Mueva el código fuera de los bucles internos. Un trozo de código más "
Packit 1470ea
"complicado que se ejecuta una sola vez es mucho más rápido que un trozo de "
Packit 1470ea
"código más simple que se ejecuta mil veces. Evite llamar habitualmente a "
Packit 1470ea
"código lento."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:124
Packit 1470ea
msgid ""
Packit 1470ea
"Give the compiler as many hints as possible. Use the const keyword. Use "
Packit 1470ea
"G_INLINE_FUNC for short, frequently called, functions. Look up "
Packit 1470ea
"G_GNUC_PURE, G_LIKELY and the other glib "
Packit 1470ea
"miscellaneous macros. Use the macros instead of gcc-specific keywords to "
Packit 1470ea
"ensure portability."
Packit 1470ea
msgstr ""
Packit 1470ea
"Proporcione al compilador tantos sugerencias como le sea posible. Use la "
Packit 1470ea
"palabra clave «const». Use G_INLINE_FUNC para funciones cortas "
Packit 1470ea
"frecuentemente llamadas. Busque G_GNUC_PURE, G_LIKELY</"
Packit 1470ea
"code> y otras macros misceláneas de glib. Use las macros en lugar de "
Packit 1470ea
"palabras clave específicas de gcc para asegurar la portabilidad."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:129
Packit 1470ea
msgid ""
Packit 1470ea
"Don't use assembly language. It is not portable and, while it may be fast on "
Packit 1470ea
"one processor, it is not even guaranteed to be fast on every processor that "
Packit 1470ea
"supports that architecture (e.g. Athlon vs. Pentium 4)."
Packit 1470ea
msgstr ""
Packit 1470ea
"No use lenguajes de ensamblado. El código no es portable y puede ser más "
Packit 1470ea
"rápido en un procesador que en otro, además no está garantizado que sea "
Packit 1470ea
"rápido en cada procesador que soporta esa arquitectura (ej. Athlon contra "
Packit 1470ea
"Pentium 4)."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:134
Packit 1470ea
msgid ""
Packit 1470ea
"Don't rewrite an existing library routine unless you are sure it is "
Packit 1470ea
"unnecessarily slow. Many CPU-intensive library routines have already been "
Packit 1470ea
"optimized. Conversely, some library routines are slow, especially ones that "
Packit 1470ea
"make system calls to the operating system."
Packit 1470ea
msgstr ""
Packit 1470ea
"No reescriba una rutina existente de una biblioteca a no ser que esté seguro "
Packit 1470ea
"de que es demasiado lenta. Muchas rutinas de bibliotecas de uso intensivo "
Packit 1470ea
"por la CPU ya se han optimizado. Algunas rutinas de bibliotecas son lentas, "
Packit 1470ea
"especialmente aquellas que realizan llamadas al sistema operativo."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:139
Packit 1470ea
msgid ""
Packit 1470ea
"Minimize the number of libraries you link to. The fewer libraries to link "
Packit 1470ea
"in, the faster the program starts. This is a difficult thing to do with "
Packit 1470ea
"GNOME."
Packit 1470ea
msgstr ""
Packit 1470ea
"Minimice el número de bibliotecas a las que enlaza. Cuanto menor sea el "
Packit 1470ea
"número de bibliotecas que enlazar, más rápido se iniciará el programa. Es "
Packit 1470ea
"una tarea difícil en GNOME."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/title
Packit 1470ea
#: C/introduction.page:146
Packit 1470ea
msgid "High Level Tricks"
Packit 1470ea
msgstr "Trucos de alto nivel"
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:149
Packit 1470ea
msgid ""
Packit 1470ea
"Take advantage of concurrency. This doesn't just mean using multiple "
Packit 1470ea
"processors, it also means taking advantage of the time the user spends "
Packit 1470ea
"thinking about what they are going to do next to perform some calculations "
Packit 1470ea
"in anticipation. Do calculations while waiting for data to be loaded off "
Packit 1470ea
"disk. Take advantage of multiple resources, use them all at once."
Packit 1470ea
msgstr ""
Packit 1470ea
"La ventaja de la concurrencia. Esto no significa simplemente usar varios "
Packit 1470ea
"procesadores, también significa aprovecharse del tiempo que el usuario pasa "
Packit 1470ea
"pensando en qué harán después, para realizar algunos cálculos anticipados. "
Packit 1470ea
"Haga cálculos mientras se espera la carga de datos desde el disco. "
Packit 1470ea
"Aprovéchese de los recursos múltiples, úselos todos a la vez."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:154
Packit 1470ea
msgid ""
Packit 1470ea
"Cheat. The user only has to think that the computer is fast, it doesn't "
Packit 1470ea
"matter whether it actually is or not. It is the time between the command and "
Packit 1470ea
"the answer that is important, it doesn't matter if the response is pre-"
Packit 1470ea
"calculated, cached, or will in fact be worked out later at a more convenient "
Packit 1470ea
"time, as long as the user gets what they expect."
Packit 1470ea
msgstr ""
Packit 1470ea
"Engañe. El usuario sólo tiene que pensar que el equipo es rápido, no importa "
Packit 1470ea
"si realmente lo es o no. Es el tiempo entre el comando y la respuesta es lo "
Packit 1470ea
"que importa, no importa si la respuesta estaba precalculada, cacheada o se "
Packit 1470ea
"trabajará en ella en cualquier momento posterior conveniente, siempre que el "
Packit 1470ea
"usuario obtenga lo que espera."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:159
Packit 1470ea
msgid ""
Packit 1470ea
"Do things in the idle loop. It is easier to program than using full multi-"
Packit 1470ea
"threading but still gets things done out of the users eye. Be careful "
Packit 1470ea
"though, if you spend too long in the idle loop your program will become "
Packit 1470ea
"sluggish. So regularly give control back to the main loop."
Packit 1470ea
msgstr ""
Packit 1470ea
"Realice trabajo en el bucle de inactividad. Es más fácil de programar que "
Packit 1470ea
"usar programación completa para multihilo pero aún así las cosas se hacen "
Packit 1470ea
"fuera de la vista del usuario. No obstante, sea cuidadoso, si se queda "
Packit 1470ea
"demasiado tiempo en el bucle de inactividad su programa acabará siendo "
Packit 1470ea
"lento. Por eso debe devolver regularmente el control al bucle principal."
Packit 1470ea
Packit 1470ea
#. (itstool) path: item/p
Packit 1470ea
#: C/introduction.page:164
Packit 1470ea
msgid ""
Packit 1470ea
"If all else fails, tell the user that the code is going to be slow and put "
Packit 1470ea
"up a progress bar. They won't be as happy as if you had just presented the "
Packit 1470ea
"results, but they will at least know the program hasn't crashed and they can "
Packit 1470ea
"go get a cup of coffee."
Packit 1470ea
msgstr ""
Packit 1470ea
"Si todo lo demás falla, dígale al usuario que el código va a ser lento y "
Packit 1470ea
"ponga una barra de progreso. No estarán tan contentos como si hubiese "
Packit 1470ea
"mostrado el resultado pero al menos sabrán que el programa no se ha colgado "
Packit 1470ea
"y que se pueden ir a preparar un café."
Packit 1470ea
Packit 1470ea
#. (itstool) path: media
Packit 1470ea
#. This is a reference to an external file such as an image or video. When
Packit 1470ea
#. the file changes, the md5 hash will change to let you know you need to
Packit 1470ea
#. update your localized copy. The msgstr is not used at all. Set it to
Packit 1470ea
#. whatever you like once you have updated your copy of the file.
Packit 1470ea
#: C/massif.page:50
Packit 1470ea
msgctxt "_"
Packit 1470ea
msgid ""
Packit 1470ea
"external ref='figures/massif-before.png' "
Packit 1470ea
"md5='1a6b2ace548e6789ab8bfacb3727b345'"
Packit 1470ea
msgstr ""
Packit 1470ea
"external ref='figures/massif-before.png' "
Packit 1470ea
"md5='1a6b2ace548e6789ab8bfacb3727b345'"
Packit 1470ea
Packit 1470ea
#. (itstool) path: media
Packit 1470ea
#. This is a reference to an external file such as an image or video. When
Packit 1470ea
#. the file changes, the md5 hash will change to let you know you need to
Packit 1470ea
#. update your localized copy. The msgstr is not used at all. Set it to
Packit 1470ea
#. whatever you like once you have updated your copy of the file.
Packit 1470ea
#: C/massif.page:124
Packit 1470ea
msgctxt "_"
Packit 1470ea
msgid ""
Packit 1470ea
"external ref='figures/massif-after.png' "
Packit 1470ea
"md5='36d1b4ad7ab49b28b69ad3eabbaa7069'"
Packit 1470ea
msgstr ""
Packit 1470ea
"external ref='figures/massif-after.png' "
Packit 1470ea
"md5='36d1b4ad7ab49b28b69ad3eabbaa7069'"
Packit 1470ea
Packit 1470ea
#. (itstool) path: page/title
Packit 1470ea
#: C/massif.page:7
Packit 1470ea
msgid "Using <app>Massif</app> for Profiling Memory Use in GNOME Software"
Packit 1470ea
msgstr ""
Packit 1470ea
"Usar <app>Massif</app> para el Perfilado del uso de memoria en software de "
Packit 1470ea
"GNOME"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:13
Packit 1470ea
msgid ""
Packit 1470ea
"<app>Massif</app> is a member of the 
Packit 1470ea
"\">valgrind</link> suite of memory-profiling tools. Its purpose is to give a "
Packit 1470ea
"detailed view of dynamic memory usage during the lifetime of the program. "
Packit 1470ea
"Specifically it records the memory use of the heap and the stack."
Packit 1470ea
msgstr ""
Packit 1470ea
"<app>Massif</app> es un miembro de las herramientas de perfilado de memoria "
Packit 1470ea
"<link href=\"http://valgrind.org/\">valgrind</link>. Su propósito es "
Packit 1470ea
"proporcionar una vista detallada del uso de memoria dinámica durante la vida "
Packit 1470ea
"de un programa. Específicamente graba el uso de memoria del montículo "
Packit 1470ea
"(«heap») y de la pila."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:16
Packit 1470ea
msgid ""
Packit 1470ea
"The heap is the region of memory which is allocated with functions like "
Packit 1470ea
"malloc. It grows on demand and is usually the largest region of memory in a "
Packit 1470ea
"program. The stack is where all the local data for functions is stored. This "
Packit 1470ea
"includes the \"automatic\" variables in C and the return address for "
Packit 1470ea
"subroutines. The stack is typically a lot smaller and a lot more active than "
Packit 1470ea
"the heap. We won't consider the stack explicitly since <app>Massif</app> "
Packit 1470ea
"treats it as though it were just another part of the heap. <app>Massif</app> "
Packit 1470ea
"also gives information about how much memory is used to manage the heap."
Packit 1470ea
msgstr ""
Packit 1470ea
"El montículo («heap») es la región de memoria que está reservada con "
Packit 1470ea
"funciones como «malloc». Crece bajo demanda y generalmente es la región de "
Packit 1470ea
"memoria más grande del programa. La pila es donde se almacenan todos los "
Packit 1470ea
"datos locales para las funciones. Incluye las variables «automáticas» de C y "
Packit 1470ea
"las direcciones de vuelta para las subrutinas. Generalmente la pila es mucho "
Packit 1470ea
"más pequeña y activa que el montículo. No se considerará explícitamente la "
Packit 1470ea
"pila ya que <app>Massif</app> la trata como si fuese otra parte del "
Packit 1470ea
"montículo. <app>Massif</app> también proporciona información acerca de "
Packit 1470ea
"cuánta memoria se usa para gestionar el montículo."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:18
Packit 1470ea
msgid ""
Packit 1470ea
"<app>Massif</app> produces two output files: a graphical overview in a "
Packit 1470ea
"postscript file and a detailed breakdown in a text file."
Packit 1470ea
msgstr ""
Packit 1470ea
"<app>Massif</app> produce dos archivos de salida: una vista general gráfica "
Packit 1470ea
"en un archivo postscript y un archivo de texto detallado."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/massif.page:23
Packit 1470ea
msgid "Using <app>Massif</app> with GNOME"
Packit 1470ea
msgstr "Usar <app>Massif</app> con GNOME"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:24
Packit 1470ea
msgid ""
Packit 1470ea
"<app>Massif</app> has very few options and for many programs does not need "
Packit 1470ea
"them. However for GNOME applications, where memory allocation might be "
Packit 1470ea
"buried deep in either glib or GTK, the number of levels down the call-stack "
Packit 1470ea
"Massif descends needs to be increased. This is achieved using the --depth "
Packit 1470ea
"parameter. By default this is 3; increasing it to 5 will guarantee the call-"
Packit 1470ea
"stack reaches down to your code. One or two more levels may also be "
Packit 1470ea
"desirable to provide your code with some context. Since the level of detail "
Packit 1470ea
"becomes quickly overwhelming it is best to start with the smaller depth "
Packit 1470ea
"parameter and only increase it when it becomes apparent that it isn't "
Packit 1470ea
"sufficient."
Packit 1470ea
msgstr ""
Packit 1470ea
"<app>Massif</app> tiene muy pocas opciones y para la mayoría de programas no "
Packit 1470ea
"se necesitan. No obstante, para las aplicaciones de GNOME donde la reserva "
Packit 1470ea
"de memoria puede estar debajo de glib o GTK, se debe aumentar el número de "
Packit 1470ea
"niveles debajo de la pilla de llamadas al que tiene descender Massif. Se "
Packit 1470ea
"consigue usando el parámetro «--depth». De forma predeterminada es 3; "
Packit 1470ea
"aumentarlo a 5 garantizará que la pilla de llamadas llega a su zona de "
Packit 1470ea
"código. Uno o dos niveles más pueden ser deseables para proporcionar algo de "
Packit 1470ea
"contexto al código. Ya que el nivel de detalle se convierte en insoportable, "
Packit 1470ea
"es mejor comenzar con un parámetro de profundidad pequeño e ir aumentándolo "
Packit 1470ea
"cuando parezca que es insuficiente."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:27
Packit 1470ea
msgid ""
Packit 1470ea
"It is also useful to tell <app>Massif</app> which functions allocate memory "
Packit 1470ea
"in glib. It removes an unnecessary layer of function calls from the reports "
Packit 1470ea
"and gives you a clearer idea of what code is allocating memory. The "
Packit 1470ea
"allocating functions in glib are g_malloc, g_malloc0, g_realloc, "
Packit 1470ea
"g_try_malloc, and g_mem_chunk_alloc. You use the --alloc-fn option to tell "
Packit 1470ea
"Massif about them."
Packit 1470ea
msgstr ""
Packit 1470ea
"También es útil decir a <app>Massif</app> qué funciones reservan memoria en "
Packit 1470ea
"glib. Quita una capa de llamadas de funciones innecesarias de los informes y "
Packit 1470ea
"le proporciona una idea más clara de qué código está reservando memoria. Las "
Packit 1470ea
"funciones de reserva de memoria en glib son «g_malloc», «g_malloc0», "
Packit 1470ea
"«g_realloc», «g_try_malloc», y «g_mem_chunk_alloc». Use la opción «--alloc-"
Packit 1470ea
"fn» para pasarle la opción a Massif."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:30
Packit 1470ea
msgid "Your command-line should therefore look something like:"
Packit 1470ea
msgstr "Su línea de comando debería parecerse a esta:"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/code
Packit 1470ea
#: C/massif.page:33
Packit 1470ea
#, no-wrap
Packit 1470ea
msgid ""
Packit 1470ea
"\n"
Packit 1470ea
"valgrind --tool=massif --depth=5  --alloc-fn=g_malloc --alloc-fn=g_realloc --alloc-fn=g_try_malloc \\\n"
Packit 1470ea
"         --alloc-fn=g_malloc0 --alloc-fn=g_mem_chunk_alloc swell-foop\n"
Packit 1470ea
"        "
Packit 1470ea
msgstr ""
Packit 1470ea
"\n"
Packit 1470ea
"valgrind --tool=massif --depth=5  --alloc-fn=g_malloc --alloc-fn=g_realloc --alloc-fn=g_try_malloc \\\n"
Packit 1470ea
"         --alloc-fn=g_malloc0 --alloc-fn=g_mem_chunk_alloc swell-foop\n"
Packit 1470ea
"        "
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:37
Packit 1470ea
msgid ""
Packit 1470ea
"<app>Swell Foop</app> is the program we will be using as an example. Be "
Packit 1470ea
"warned that, since valgrind emulates the CPU, it will run very "
Packit 1470ea
"slowly. You will also need a lot of memory."
Packit 1470ea
msgstr ""
Packit 1470ea
"<app>Swell Foop</app> es el programa que se usará como ejemplo. Tenga en "
Packit 1470ea
"cuenta que, ya que valgrind emula la CPU, se ejecutará muy "
Packit 1470ea
"despacio. También necesitará mucha memoria."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/massif.page:41
Packit 1470ea
msgid "Interpreting the Results"
Packit 1470ea
msgstr "Interpretar los resultados"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:42
Packit 1470ea
msgid ""
Packit 1470ea
"The graphical output of <app>Massif</app> is largely self explanatory. Each "
Packit 1470ea
"band represents the memory allocated by one function over time. Once you "
Packit 1470ea
"identify which bands are using the most memory, usually the big thick ones "
Packit 1470ea
"at the top you will have to consult the text file for the details."
Packit 1470ea
msgstr ""
Packit 1470ea
"La salida gráfica de <app>Massif</app> se explica por si misma. Cada banda "
Packit 1470ea
"representa la memoria que una función tiene reservada en el tiempo. Una vez "
Packit 1470ea
"que haya identificado las bandas que usan más memoria, generalmente las "
Packit 1470ea
"anchas en la parte superior, tendrá que consultar el archivo de texto para "
Packit 1470ea
"ver los detalles."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:45
Packit 1470ea
msgid ""
Packit 1470ea
"The text file is arranged as a hierarchy of sections, at the top is a list "
Packit 1470ea
"of the worst memory users arranged in order of decreasing spacetime. Below "
Packit 1470ea
"this are further sections, each breaking the results down into finer detail "
Packit 1470ea
"as you proceed down the call-stack. To illustrate this we will use the "
Packit 1470ea
"output of the command above."
Packit 1470ea
msgstr ""
Packit 1470ea
"El archivo de texto se organiza como una jerarquía de secciones, en la parte "
Packit 1470ea
"superior hay una lista de los peores usuarios de memoria organizada en orden "
Packit 1470ea
"decreciente. Debajo de esta lista están las siguientes secciones, cada una "
Packit 1470ea
"mostrando los resultados en detalle según se procede en la pila de llamadas. "
Packit 1470ea
"Para ilustrar esto se usará la salida del comando anterior."
Packit 1470ea
Packit 1470ea
#. (itstool) path: figure/title
Packit 1470ea
#: C/massif.page:49
Packit 1470ea
msgid ""
Packit 1470ea
"<app>Massif</app> output for the unoptimized version of the <app>Swell Foop</"
Packit 1470ea
"app> program."
Packit 1470ea
msgstr ""
Packit 1470ea
"La salida de <app>Massif</app> para la versión no optimizada del programa "
Packit 1470ea
"<app>Swell Foop</app>."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:52
Packit 1470ea
#| msgid ""
Packit 1470ea
#| "<link xref=\"optimization-massif-FIG-output-unoptimized\"/> shows a "
Packit 1470ea
#| "typical postscript output from <app>Massif</app>. This is the result you "
Packit 1470ea
#| "would get from playing a single game of <app>Swell Foop</app> (version "
Packit 1470ea
#| "2.8.0) and then quitting. The postscript file will have a name like "
Packit 1470ea
#| "<file>massif.12345.ps</file> and the text file will be called "
Packit 1470ea
#| "<file>massif.12345.txt</file>. The number in the middle is the process ID "
Packit 1470ea
#| "of the program that was examined. If you actually try this example you "
Packit 1470ea
#| "will find two versions of each file, with slightly different numbers, "
Packit 1470ea
#| "this is because <app>Swell Foop</app> starts a second process and "
Packit 1470ea
#| "<app>Massif</app> follows that too. We will ignore this second process, "
Packit 1470ea
#| "it consumes very little memory."
Packit 1470ea
msgid ""
Packit 1470ea
"The image above shows a typical postscript output from <app>Massif</app>. "
Packit 1470ea
"This is the result you would get from playing a single game of <app>Swell "
Packit 1470ea
"Foop</app> (version 2.8.0) and then quitting. The postscript file will have "
Packit 1470ea
"a name like <file>massif.12345.ps</file> and the text file will be called "
Packit 1470ea
"<file>massif.12345.txt</file>. The number in the middle is the process ID of "
Packit 1470ea
"the program that was examined. If you actually try this example you will "
Packit 1470ea
"find two versions of each file, with slightly different numbers, this is "
Packit 1470ea
"because <app>Swell Foop</app> starts a second process and <app>Massif</app> "
Packit 1470ea
"follows that too. We will ignore this second process, it consumes very "
Packit 1470ea
"little memory."
Packit 1470ea
msgstr ""
Packit 1470ea
"La imagen anterior muestra una salida postscript típica de <app>Massif</"
Packit 1470ea
"app>. Este es el resultado que obtendrá al jugar una partida simple de "
Packit 1470ea
"<app>Swell Foop</app> (versión 2.8.0) y después salir. El archivo postscript "
Packit 1470ea
"tendrá un nombre tipo <file>massif.12345.ps</file> y el archivo de texto se "
Packit 1470ea
"llamará <file>massif.12345.txt</file>. El número en el medio es el ID del "
Packit 1470ea
"proceso del programa que se examinó. Si prueba este ejemplo encontrará dos "
Packit 1470ea
"versiones de cada archivo con números ligeramente diferentes, esto es porque "
Packit 1470ea
"<app>Swell Foop</app> inicia un segundo proceso y <app>Massif</app> también "
Packit 1470ea
"lo sigue. Se ignorará el segundo proceso ya que consume muy poca memoria."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:66
Packit 1470ea
msgid ""
Packit 1470ea
"At the top of the graph we see a large yellow band labelled gdk_pixbuf_new. "
Packit 1470ea
"This seems like an ideal candidate for optimization, but we will need to use "
Packit 1470ea
"the text file to find out what is calling gdk_pixbuf_new. The top of the "
Packit 1470ea
"text file will look something like this:"
Packit 1470ea
msgstr ""
Packit 1470ea
"En la parte superior de la gráfica se ve una gran banda amarilla etiquetada "
Packit 1470ea
"como gdk_pixbuf_new. Parece ser un candidato ideal para la optimización, "
Packit 1470ea
"pero se necesitará usar el archivo de texto para encontrar qué está llamando "
Packit 1470ea
"a gdk_pixbuf_new. La parte superior del archivo de texto mostrará algo como "
Packit 1470ea
"lo siguiente:"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/code
Packit 1470ea
#: C/massif.page:69
Packit 1470ea
#, no-wrap
Packit 1470ea
msgid ""
Packit 1470ea
"\n"
Packit 1470ea
"Command: ./swell-foop\n"
Packit 1470ea
"\n"
Packit 1470ea
"== 0 ===========================\n"
Packit 1470ea
"Heap allocation functions accounted for 90.4% of measured spacetime\n"
Packit 1470ea
"\n"
Packit 1470ea
"Called from:\n"
Packit 1470ea
"  28.8% : 0x6BF83A: gdk_pixbuf_new (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    6.1% : 0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    5.9% : 0x510B3C: (within /usr/lib/libfreetype.so.6.3.7)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    3.5% : 0x2A4A6B: __gconv_open (in /lib/tls/libc-2.3.3.so)\n"
Packit 1470ea
"        "
Packit 1470ea
msgstr ""
Packit 1470ea
"\n"
Packit 1470ea
"Command: ./swell-foop\n"
Packit 1470ea
"\n"
Packit 1470ea
"== 0 ===========================\n"
Packit 1470ea
"Heap allocation functions accounted for 90.4% of measured spacetime\n"
Packit 1470ea
"\n"
Packit 1470ea
"Called from:\n"
Packit 1470ea
"  28.8% : 0x6BF83A: gdk_pixbuf_new (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    6.1% : 0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    5.9% : 0x510B3C: (within /usr/lib/libfreetype.so.6.3.7)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    3.5% : 0x2A4A6B: __gconv_open (in /lib/tls/libc-2.3.3.so)\n"
Packit 1470ea
"        "
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:84
Packit 1470ea
msgid ""
Packit 1470ea
"The line with the '=' signs indicates how far down the stack trace we are, "
Packit 1470ea
"in this case we are at the top. After this it lists the heaviest users of "
Packit 1470ea
"memory in order of decreasing spacetime. Spacetime is the product of the "
Packit 1470ea
"amount of memory used and how long it was used for. It corresponds to the "
Packit 1470ea
"area of the bands in the graph. This part of the file tells us what we "
Packit 1470ea
"already know: most of the spacetime is dedicated to gdk_pixbuf_new. To find "
Packit 1470ea
"out what called gdk_pixbuf_new we need to search further down the text file:"
Packit 1470ea
msgstr ""
Packit 1470ea
"La línea con los signos «=» indica a qué distancia de la traza de la pila "
Packit 1470ea
"estamos, en este caso al principio. Después lista los mayores usuarios de "
Packit 1470ea
"memoria en orden decreciente del espacio-tiempo. El espacio-tiempo es el "
Packit 1470ea
"producto de la cantidad de memoria usada y de la duración de su uso. Se "
Packit 1470ea
"corresponde con el área de las bandas en el gráfico. Esta parte del archivo "
Packit 1470ea
"proporciona información acerca de algo que ya se sabe: la mayoría del "
Packit 1470ea
"espacio-tiempo se dedica a gdk_pixbuf_new. Para buscar qué llamó a "
Packit 1470ea
"gdk_pixbuf_new necesitamos buscar más abajo en el archivo de texto:"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/code
Packit 1470ea
#: C/massif.page:87
Packit 1470ea
#, no-wrap
Packit 1470ea
msgid ""
Packit 1470ea
"\n"
Packit 1470ea
"== 4 ===========================\n"
Packit 1470ea
"Context accounted for 28.8% of measured spacetime\n"
Packit 1470ea
"  0x6BF83A: gdk_pixbuf_new (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
Packit 1470ea
"  0x3A998998: (within /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so)\n"
Packit 1470ea
"  0x6C2760: (within /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
Packit 1470ea
"  0x6C285E: gdk_pixbuf_new_from_file (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"Called from:\n"
Packit 1470ea
"  27.8% : 0x804C1A3: load_scenario (swell-foop.c:463)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    0.9% : 0x3E8095E: (within /usr/lib/libgnomeui-2.so.0.792.0)\n"
Packit 1470ea
"\n"
Packit 1470ea
"  and 1 other insignificant place\n"
Packit 1470ea
"        "
Packit 1470ea
msgstr ""
Packit 1470ea
"\n"
Packit 1470ea
"== 4 ===========================\n"
Packit 1470ea
"Context accounted for 28.8% of measured spacetime\n"
Packit 1470ea
"  0x6BF83A: gdk_pixbuf_new (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
Packit 1470ea
"  0x3A998998: (within /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so)\n"
Packit 1470ea
"  0x6C2760: (within /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
Packit 1470ea
"  0x6C285E: gdk_pixbuf_new_from_file (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"Called from:\n"
Packit 1470ea
"  27.8% : 0x804C1A3: load_scenario (swell-foop.c:463)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    0.9% : 0x3E8095E: (within /usr/lib/libgnomeui-2.so.0.792.0)\n"
Packit 1470ea
"\n"
Packit 1470ea
"  and 1 other insignificant place\n"
Packit 1470ea
"        "
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:102
Packit 1470ea
msgid ""
Packit 1470ea
"The first line tells us we are now four levels deep into the stack. Below it "
Packit 1470ea
"is a listing of the function calls that leads from here to gdk_pixbuf_new. "
Packit 1470ea
"Finally there is a list of functions that are at the next level down and "
Packit 1470ea
"call these functions. There are, of course, also entries for levels 1, 2, "
Packit 1470ea
"and 3, but this is the first level to reach right down through the GDK code "
Packit 1470ea
"to the <app>Swell Foop</app> code. From this listing, we can see instantly "
Packit 1470ea
"that the problem code is load_scenario."
Packit 1470ea
msgstr ""
Packit 1470ea
"La primera línea dice que estamos a cuatro niveles de profundidad en la "
Packit 1470ea
"pila. Debajo es una lista de las llamadas de funciones que de aquí a "
Packit 1470ea
"gdk_pixbuf_new. Finalmente existe una lista de funciones que son el "
Packit 1470ea
"siguiente nivel por debajo y llaman a esas funciones. También existen, "
Packit 1470ea
"obviamente, entradas para los niveles 1, 2 y 3, pero este es el primer nivel "
Packit 1470ea
"que llega justo debajo del código GDK del código de <app>Swell Foop</app>. "
Packit 1470ea
"Desde esta lista se puede ver instantáneamente que el problema del código es "
Packit 1470ea
"«load_scenario»."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:105
Packit 1470ea
msgid ""
Packit 1470ea
"Now that we know what part of our code is using all the spacetime we can "
Packit 1470ea
"look at it and find out why. It turns out that the load_scenario is loading "
Packit 1470ea
"a pixbuf from file and then never freeing that memory. Having identified the "
Packit 1470ea
"problem code, we can start to fix it."
Packit 1470ea
msgstr ""
Packit 1470ea
"Ahora que se sabe qué parte del código usa todo el espacio de tiempo se "
Packit 1470ea
"puede buscar el porqué. Resulta que load_scenario está cargando un pixbuf de "
Packit 1470ea
"un archivo y nunca libera esa memoria. Habiendo identificado el código del "
Packit 1470ea
"problema se puede comenzar a arreglarlo."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/massif.page:110
Packit 1470ea
msgid "Acting on the Results"
Packit 1470ea
msgstr "Actuar sobre los resultados"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:111
Packit 1470ea
msgid ""
Packit 1470ea
"Reducing spacetime consumption is good, but there are two ways of reducing "
Packit 1470ea
"it and they are not equal. You can either reduce the amount of memory "
Packit 1470ea
"allocated, or reduce the amount of time it is allocated for. Consider for a "
Packit 1470ea
"moment a model system with only two processes running. Both processes use up "
Packit 1470ea
"almost all the physical RAM and if they overlap at all then the system will "
Packit 1470ea
"swap and everything will slow down. Obviously if we reduce the memory usage "
Packit 1470ea
"of each process by a factor of two then they can peacefully coexist without "
Packit 1470ea
"the need for swapping. If instead we reduce the time the memory is allocated "
Packit 1470ea
"by a factor of two then the two programs can coexist, but only as long as "
Packit 1470ea
"their periods of high memory use don't overlap. So it is better to reduce "
Packit 1470ea
"the amount of memory allocated."
Packit 1470ea
msgstr ""
Packit 1470ea
"Reducir el consumo de espacio-tiempo es bueno, pero existen otras dos formas "
Packit 1470ea
"de reducirlo y no son iguales. Puede reducir la cantidad de memoria "
Packit 1470ea
"reservada o reducir la cantidad de tiempo que está reservada. Considere por "
Packit 1470ea
"un momento un modelo de sistema con sólo dos procesadores. Ambos "
Packit 1470ea
"procesadores usan toda la memoria RAM física y si se solapan el sistema "
Packit 1470ea
"usará la memoria de intercambio y todo se ralentizará. Obviamente si se "
Packit 1470ea
"reduce el uso de memoria de cada proceso en un factor de dos, entonces "
Packit 1470ea
"pueden coexistir pacíficamente sin necesidad de usar la memoria de "
Packit 1470ea
"intercambio. Si en lugar de ello se reduce el tiempo que la memoria está "
Packit 1470ea
"reservada en un factor de dos, entonces los dos programas pueden coexistir, "
Packit 1470ea
"pero sólo siempre que sus periodos de máximo uso de memoria no se solapen. "
Packit 1470ea
"Por ello es mejor reducir la cantidad de memoria reservada."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:114
Packit 1470ea
#| msgid ""
Packit 1470ea
#| "Unfortunately, the choice of optimization is also constrained by the "
Packit 1470ea
#| "needs of the program. The size of the pixbuf data in <app>Swell Foop</"
Packit 1470ea
#| "app> is determined by the size of the game's graphics and cannot be "
Packit 1470ea
#| "easily reduced. However, the amount of time it spends loaded into memory "
Packit 1470ea
#| "can be drastically reduced. 
Packit 1470ea
#| "optimized\"/> shows the <app>Massif</app> analysis of <app>Swell Foop</"
Packit 1470ea
#| "app> after being altered to dispose of the pixbufs once the images have "
Packit 1470ea
#| "been loaded into the X server."
Packit 1470ea
msgid ""
Packit 1470ea
"Unfortunately, the choice of optimization is also constrained by the needs "
Packit 1470ea
"of the program. The size of the pixbuf data in <app>Swell Foop</app> is "
Packit 1470ea
"determined by the size of the game's graphics and cannot be easily reduced. "
Packit 1470ea
"However, the amount of time it spends loaded into memory can be drastically "
Packit 1470ea
"reduced. The image below shows the <app>Massif</app> analysis of <app>Swell "
Packit 1470ea
"Foop</app> after being altered to dispose of the pixbufs once the images "
Packit 1470ea
"have been loaded into the X server."
Packit 1470ea
msgstr ""
Packit 1470ea
"Desafortunadamente la opción de la optimización también está restringida por "
Packit 1470ea
"las necesidades del programa. El tamaño de los datos de pixbuf en <app>Swell "
Packit 1470ea
"Foop</app> está determinado por el tamaño de los gráficos del juego y no se "
Packit 1470ea
"puede reducir fácilmente. No obstante, la cantidad de tiempo que está "
Packit 1470ea
"cargado en la memoria se puede reducir drásticamente. La siguiente imagen "
Packit 1470ea
"muestra el análisis de <app>Massif</app> para <app>Swell Foop</app> después "
Packit 1470ea
"de alterar la disposición de los pixbuf una vez que se han cargado las "
Packit 1470ea
"imágenes en el servidor X."
Packit 1470ea
Packit 1470ea
#. (itstool) path: figure/title
Packit 1470ea
#: C/massif.page:123
Packit 1470ea
msgid ""
Packit 1470ea
"<app>Massif</app> output for the optimized <app>Swell Foop</app> program."
Packit 1470ea
msgstr ""
Packit 1470ea
"La salida de <app>Massif</app> para el programa optimizado <app>Swell Foop</"
Packit 1470ea
"app>."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:126
Packit 1470ea
msgid ""
Packit 1470ea
"The spacetime use of gdk_pixbuf_new is now a thin band that only spikes "
Packit 1470ea
"briefly (it is now the sixteenth band down and shaded magenta). As a bonus, "
Packit 1470ea
"the peak memory use has dropped by 200 kB since the spike occurs before "
Packit 1470ea
"other memory is allocated. If two processes like this were run together the "
Packit 1470ea
"chances of the peak memory usage coinciding, and hence the risk of swapping, "
Packit 1470ea
"would be quite low."
Packit 1470ea
msgstr ""
Packit 1470ea
"Ahora el espacio-tiempo que usa gdk_pixbuf_new es una banda delgada que sólo "
Packit 1470ea
"tiene picos brevemente (ahora es la banda número dieciséis de magenta "
Packit 1470ea
"sombreado). Como ventaja, el pico de memoria ha disminuido 200 kB ya que el "
Packit 1470ea
"pico ocurre antes de que se reserve otra memoria. Si dos procesos como estos "
Packit 1470ea
"se tuviesen que ejecutar a la vez las posibilidades de que los picos de uso "
Packit 1470ea
"de memoria coincidiesen, y por ello el riesgo de usar la memoria de "
Packit 1470ea
"intercambio, serían bastante escasas."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:129
Packit 1470ea
msgid ""
Packit 1470ea
"Can we do better ? A quick examination of <app>Massif</app>'s text output "
Packit 1470ea
"reveals: g_strdup to be the new major offender."
Packit 1470ea
msgstr ""
Packit 1470ea
"¿Se puede hacer mejor? Un examen rápido de la salida de texto de "
Packit 1470ea
"<app>Massif</app> releva que g_strdup es el nuevo mayor problema."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/code
Packit 1470ea
#: C/massif.page:132
Packit 1470ea
#, no-wrap
Packit 1470ea
msgid ""
Packit 1470ea
"\n"
Packit 1470ea
"Command: ./swell-foop\n"
Packit 1470ea
"\n"
Packit 1470ea
"== 0 ===========================\n"
Packit 1470ea
"Heap allocation functions accounted for 87.6% of measured spacetime\n"
Packit 1470ea
"\n"
Packit 1470ea
"Called from:\n"
Packit 1470ea
"    7.7% : 0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    7.6% : 0x43BC9F: (within /usr/lib/libgdk-x11-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    6.9% : 0x510B3C: (within /usr/lib/libfreetype.so.6.3.7)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    5.2% : 0x2A4A6B: __gconv_open (in /lib/tls/libc-2.3.3.so)\n"
Packit 1470ea
"        "
Packit 1470ea
msgstr ""
Packit 1470ea
"\n"
Packit 1470ea
"Command: ./swell-foop\n"
Packit 1470ea
"\n"
Packit 1470ea
"== 0 ===========================\n"
Packit 1470ea
"Heap allocation functions accounted for 87.6% of measured spacetime\n"
Packit 1470ea
"\n"
Packit 1470ea
"Called from:\n"
Packit 1470ea
"    7.7% : 0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    7.6% : 0x43BC9F: (within /usr/lib/libgdk-x11-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    6.9% : 0x510B3C: (within /usr/lib/libfreetype.so.6.3.7)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    5.2% : 0x2A4A6B: __gconv_open (in /lib/tls/libc-2.3.3.so)\n"
Packit 1470ea
"        "
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:147
Packit 1470ea
msgid ""
Packit 1470ea
"If we look closer though we see that it is called from many, many, places."
Packit 1470ea
msgstr ""
Packit 1470ea
"Si se mira con detenimiento se ve que se llama desde muchos, muchos sitios."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/code
Packit 1470ea
#: C/massif.page:150
Packit 1470ea
#, no-wrap
Packit 1470ea
msgid ""
Packit 1470ea
"\n"
Packit 1470ea
"== 1 ===========================\n"
Packit 1470ea
"Context accounted for  7.7% of measured spacetime\n"
Packit 1470ea
"  0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"Called from:\n"
Packit 1470ea
"    1.8% : 0x8BF606: gtk_icon_source_copy (in /usr/lib/libgtk-x11-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    1.1% : 0x67AF6B: g_param_spec_internal (in /usr/lib/libgobject-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    0.9% : 0x91FCFC: (within /usr/lib/libgtk-x11-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    0.8% : 0x57EEBF: g_quark_from_string (in /usr/lib/libglib-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"  and 155 other insignificant places\n"
Packit 1470ea
"        "
Packit 1470ea
msgstr ""
Packit 1470ea
"\n"
Packit 1470ea
"== 1 ===========================\n"
Packit 1470ea
"Context accounted for  7.7% of measured spacetime\n"
Packit 1470ea
"  0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"Called from:\n"
Packit 1470ea
"    1.8% : 0x8BF606: gtk_icon_source_copy (in /usr/lib/libgtk-x11-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    1.1% : 0x67AF6B: g_param_spec_internal (in /usr/lib/libgobject-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    0.9% : 0x91FCFC: (within /usr/lib/libgtk-x11-2.0.so.0.400.9)\n"
Packit 1470ea
"\n"
Packit 1470ea
"    0.8% : 0x57EEBF: g_quark_from_string (in /usr/lib/libglib-2.0.so.0.400.6)\n"
Packit 1470ea
"\n"
Packit 1470ea
"  and 155 other insignificant places\n"
Packit 1470ea
"        "
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:166
Packit 1470ea
msgid ""
Packit 1470ea
"We now face diminishing returns for our optimization efforts. The graph "
Packit 1470ea
"hints at another possible approach: Both the \"other\" and \"heap admin\" "
Packit 1470ea
"bands are quite large. This tells us that there are a lot of small "
Packit 1470ea
"allocations being made from a variety of places. Eliminating these will be "
Packit 1470ea
"difficult, but if they can be grouped then the individual allocations can be "
Packit 1470ea
"larger and the \"heap admin\" overhead can be reduced."
Packit 1470ea
msgstr ""
Packit 1470ea
"Ahora se encara la reducción de la salida para los esfuerzos de "
Packit 1470ea
"optimización. El gráfico sugiere otra posible aproximación: tanto la banda "
Packit 1470ea
"«other» como la «heap admin» son bastante largas. Esto quiere decir que "
Packit 1470ea
"existen muchas pequeñas reservas realizadas desde cierta variedad de sitios. "
Packit 1470ea
"Eliminarlas será difícil, pero si se pueden agrupar, entonces las reservas "
Packit 1470ea
"individuales pueden ser más grandes y la elevada banda «heap admin» puede "
Packit 1470ea
"reducirse."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/title
Packit 1470ea
#: C/massif.page:171
Packit 1470ea
msgid "Caveats"
Packit 1470ea
msgstr "Advertencias"
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:172
Packit 1470ea
msgid ""
Packit 1470ea
"There are a couple of things to watch out for: Firstly, spacetime is only "
Packit 1470ea
"reported as a percentage, you have to compare it to the overall size of the "
Packit 1470ea
"program to decide if the amount of memory is worth pursuing. The graph, with "
Packit 1470ea
"its kilobyte vertical axis, is good for this."
Packit 1470ea
msgstr ""
Packit 1470ea
"Existen un par de cosas cosas para tener en cuenta: Primeramente, sólo se "
Packit 1470ea
"informa del espacio de tiempo como porcentaje, tiene que compararlo con el "
Packit 1470ea
"tamaño total del programa para decidir si merece la pena perseguir la "
Packit 1470ea
"cantidad total de memoria. El gráfico, con su eje vertical de kilobytes, es "
Packit 1470ea
"bueno para ello."
Packit 1470ea
Packit 1470ea
#. (itstool) path: section/p
Packit 1470ea
#: C/massif.page:175
Packit 1470ea
msgid ""
Packit 1470ea
"Secondly, <app>Massif</app> only takes into account the memory used by your "
Packit 1470ea
"own program. Resources like pixmaps are stored in the X server and aren't "
Packit 1470ea
"considered by <app>Massif</app>. In the <app>Swell Foop</app> example we "
Packit 1470ea
"have actually only moved the memory consumption from client-side pixbufs to "
Packit 1470ea
"server-side pixmaps. Even though we cheated there are performance gains. "
Packit 1470ea
"Keeping the image data in the X server makes the graphics routines quicker "
Packit 1470ea
"and removes a lot of inter-process communication. Also, the pixmaps will be "
Packit 1470ea
"stored in a native graphics format which is often more compact than the 32-"
Packit 1470ea
"bit RGBA format used by gdk_pixbuf. To measure the effect of pixmaps, and "
Packit 1470ea
"other X resources use the 
Packit 1470ea
"xrestop\">xrestop</link> program."
Packit 1470ea
msgstr ""
Packit 1470ea
"Segundo, <app>Massif</app> sólo tiene en cuenta la memoria usada por su "
Packit 1470ea
"propio programa. Los recursos como los mapas de píxeles se almacenan en el "
Packit 1470ea
"servidor X y <app>Massif</app> no los considera. En el ejemplo de <app>Swell "
Packit 1470ea
"Foop</app> realmente sólo se ha movido el consumo de memoria de los pixbuf "
Packit 1470ea
"de la parte del cliente a los pixbuf de la parte del servidor. Aunque se "
Packit 1470ea
"haya hecho trampa se ha ganado en rendimiento. Mantener los datos de "
Packit 1470ea
"imágenes en el servidor X hace que las rutinas de gráficos sean más rápidas "
Packit 1470ea
"y elimina muchos procesos de comunicación interna. También, los mapas de "
Packit 1470ea
"píxeles se almacenan en un formato de gráficos nativo que es más compacto "
Packit 1470ea
"que el formato de 32-bit RGBA usado por gdk_pixbuf. Para medir el efecto de "
Packit 1470ea
"los mapas de píxeles y otros recursos X use el programa 
Packit 1470ea
"www.freedesktop.org/Software/xrestop\">xrestop</link>."
Packit 1470ea
Packit 1470ea
#~ msgid "Optimizing GNOME Software"
Packit 1470ea
#~ msgstr "Optimizar software de GNOME"
Packit 1470ea
Packit 1470ea
#~ msgid "GNOME Documentation Project"
Packit 1470ea
#~ msgstr "Proyecto de documentación de GNOME"
Packit 1470ea
Packit 1470ea
#~ msgid "<year>2004-2005</year> <holder>Callum McKenzie</holder>"
Packit 1470ea
#~ msgstr "<year>2004-2005</year> <holder>Callum McKenzie</holder>"
Packit 1470ea
Packit 1470ea
#~ msgid "<year>2004-2005</year> <holder>Robert Love</holder>"
Packit 1470ea
#~ msgstr "<year>2004-2005</year> <holder>Robert Love</holder>"
Packit 1470ea
Packit 1470ea
#~ msgid "<firstname>Callum</firstname> <surname>McKenzie</surname>"
Packit 1470ea
#~ msgstr "<firstname>Callum</firstname> <surname>McKenzie</surname>"
Packit 1470ea
Packit 1470ea
#~ msgid "<firstname>Robert</firstname> <surname>Love</surname>"
Packit 1470ea
#~ msgstr "<firstname>Robert</firstname> <surname>Love</surname>"
Packit 1470ea
Packit 1470ea
#~ msgid "William Johnston"
Packit 1470ea
#~ msgstr "William Johnston"
Packit 1470ea
Packit 1470ea
#~ msgid "Intial conversion to docbook format."
Packit 1470ea
#~ msgstr "Conversión inicial al formato docbook."
Packit 1470ea
Packit 1470ea
#~ msgid ""
Packit 1470ea
#~ "<revnumber>0.1</revnumber> <date>November 2007</date> <_:revdescription-1/"
Packit 1470ea
#~ ">"
Packit 1470ea
#~ msgstr ""
Packit 1470ea
#~ "<revnumber>0.1</revnumber> <date>noviembre de 2007</date> <_:"
Packit 1470ea
#~ "revdescription-1/>"
Packit 1470ea
Packit 1470ea
#~ msgid "The Quick Guide to Optimizing GNOME Programs"
Packit 1470ea
#~ msgstr "Guía rápida para optimizar programas de GNOME"
Packit 1470ea
Packit 1470ea
#~ msgid "Callum"
Packit 1470ea
#~ msgstr "Callum"
Packit 1470ea
Packit 1470ea
#~ msgid "McKenzie"
Packit 1470ea
#~ msgstr "McKenzie"
Packit 1470ea
Packit 1470ea
#~ msgid "Robert"
Packit 1470ea
#~ msgstr "Robert"
Packit 1470ea
Packit 1470ea
#~ msgid "Love"
Packit 1470ea
#~ msgstr "Love"
Packit 1470ea
Packit 1470ea
#~ msgid "0.1"
Packit 1470ea
#~ msgstr "0.1"
Packit 1470ea
Packit 1470ea
#~ msgid "November 2007"
Packit 1470ea
#~ msgstr "Noviembre de 2007"