|
Packit |
1470ea |
# French translation for gnome-devel-docs.
|
|
Packit |
1470ea |
# Copyright (C) 2009-2011 gnome-devel-docs's COPYRIGHT HOLDER
|
|
Packit |
1470ea |
# This file is distributed under the same license as the gnome-devel-docs package.
|
|
Packit |
1470ea |
#
|
|
Packit |
1470ea |
# Nicolas Repentin <nicolas.repentin@gmail.com>, 2009.
|
|
Packit |
1470ea |
# Bruno Brouard <annoa.b@gmail.com>, 2010,2012.
|
|
Packit |
1470ea |
# Gérard Baylard <gerard.b@bbox.fr>, 2010.
|
|
Packit |
1470ea |
# Yoann Fievez <yoann.fievez@gmail.com>, 2013.
|
|
Packit |
1470ea |
# Julien Hardelin <jhardlin@orange.fr>, 2013.
|
|
Packit |
1470ea |
msgid ""
|
|
Packit |
1470ea |
msgstr ""
|
|
Packit |
1470ea |
"Project-Id-Version: gnome-devel-docs master\n"
|
|
Packit |
1470ea |
"Report-Msgid-Bugs-To: \n"
|
|
Packit |
1470ea |
"POT-Creation-Date: 2016-08-16 09:26+0000\n"
|
|
Packit |
1470ea |
"PO-Revision-Date: 2016-09-16 23:14+0200\n"
|
|
Packit |
1470ea |
"Last-Translator: Julien Hardelin <jhardlin@orange.fr>\n"
|
|
Packit |
1470ea |
"Language-Team: French <GNOME French Team <gnomefr@traduc.org>\">\n"
|
|
Packit |
1470ea |
"Language: fr\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 |
|
|
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 |
"Nicolas Repentin <nicolas.repentin@gmail.com>, 2009\n"
|
|
Packit |
1470ea |
"Gérard Baylard <Geodebay@gmail.com>, 2010\n"
|
|
Packit |
1470ea |
"Bruno Brouard <annoa.b@gmail.com>, 2010,2012\n"
|
|
Packit |
1470ea |
"Yoann Fievez <yoann.fievez@gmail.com>, 2013 \n"
|
|
Packit |
1470ea |
"Julien Hardelin <jhardlin@orange.fr>,2013"
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: page/title
|
|
Packit |
1470ea |
#: C/harmful.page:7
|
|
Packit |
1470ea |
msgid "Disk Seeks Considered Harmful"
|
|
Packit |
1470ea |
msgstr "Effets dommageables des recherches sur disque"
|
|
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 |
"La recherche sur disque est une des opérations les plus coûteuses que vous "
|
|
Packit |
1470ea |
"puissiez peut-être réaliser. Vous pouvez ne pas le savoir à partir de "
|
|
Packit |
1470ea |
"l'examen du décompte des recherches effectuées, mais croyez-moi, elles sont "
|
|
Packit |
1470ea |
"coûteuses. Par conséquent, abstenez-vous des piètres comportements ci-après :"
|
|
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 "disperser nombre de petits fichiers un peu partout dans le disque,"
|
|
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 "ouvrir, inspecter et lire beaucoup de fichiers partout sur le disque."
|
|
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 |
"exécuter les opérations précédentes sur des fichiers montés à plusieurs "
|
|
Packit |
1470ea |
"reprises, comme pour s'assurer de leur fragmentation et provoquer des "
|
|
Packit |
1470ea |
"recherches encore plus coûteuses,"
|
|
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 |
"exécuter les opérations précédentes sur des fichiers situés dans des "
|
|
Packit |
1470ea |
"répertoires différents, comme pour s'assurer qu'ils soient dans des groupes "
|
|
Packit |
1470ea |
"de pistes différents et provoquer des recherches encore plus coûteuses,"
|
|
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 |
"faire les opérations précédentes plusieurs fois alors qu'on aurait pu se "
|
|
Packit |
1470ea |
"contenter d'une seule."
|
|
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 |
"Voici des conseils pour optimiser votre code pour des recherches optimales :"
|
|
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 "rassemblez les données dans un seul fichier,"
|
|
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 "gardez l'ensemble des données dans un même répertoire,"
|
|
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 ""
|
|
Packit |
1470ea |
"mettez en cache les données afin de ne pas avoir à les relire constamment,"
|
|
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 |
"partagez les données afin de ne pas avoir à les relire à partir du disque à "
|
|
Packit |
1470ea |
"chaque chargement de l'application,"
|
|
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 |
"envisagez la mise en cache de toutes les données dans un fichier binaire "
|
|
Packit |
1470ea |
"unique, bien aligné et qui peut être mappé."
|
|
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 |
"Le problème de la recherche sur disque est aggravé dans le cas des lectures, "
|
|
Packit |
1470ea |
"qui est malheureusement ce que nous faisons. N'oubliez pas, les lectures "
|
|
Packit |
1470ea |
"s'effectuent en règle générale de manière synchrone tandis que les écritures "
|
|
Packit |
1470ea |
"s'effectuent de manière asynchrone. Ce seul fait complique le problème : "
|
|
Packit |
1470ea |
"sérialiser chaque lecture contribue à la latence du programme."
|
|
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 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 |
"Autorisation est accordée pour copier, distribuer et/ou modifier ce document "
|
|
Packit |
1470ea |
"selon les termes de la GNU Free Documentation License, Version 1.1 ou "
|
|
Packit |
1470ea |
"ultérieure publiée par la Free Software Foundation sans section inaltérable, "
|
|
Packit |
1470ea |
"sans texte de première page de couverture ni texte de dernière page de "
|
|
Packit |
1470ea |
"couverture. Vous pouvez obtenir une copie de la GNU Free Documentation "
|
|
Packit |
1470ea |
"License de la the Free Software Foundation en suivant
|
|
Packit |
1470ea |
"www.fsf.org\">ce site Web</link> ou en écrivant à : Free Software "
|
|
Packit |
1470ea |
"Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 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 |
"La plupart des noms utilisés par les entreprises pour distinguer leurs "
|
|
Packit |
1470ea |
"produits et services sont des marques déposées. Lorsque ces noms "
|
|
Packit |
1470ea |
"apparaissent dans la documentation GNOME et que les membres du projet de "
|
|
Packit |
1470ea |
"Documentation GNOME sont informés de l'existence de ces marques déposées, "
|
|
Packit |
1470ea |
"soit ces noms entiers, soit leur première lettre est en majuscule."
|
|
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 |
"Un logiciel peut être optimisé de plusieurs façons : pour la vitesse, la "
|
|
Packit |
1470ea |
"taille du programme ou l'utilisation de la mémoire. Cette section contient "
|
|
Packit |
1470ea |
"conseils et tutoriels pour optimiser les logiciels."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: page/title
|
|
Packit |
1470ea |
#: C/index.page:35
|
|
Packit |
1470ea |
msgid "Optimization Guide"
|
|
Packit |
1470ea |
msgstr "Guide d'optimisation"
|
|
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 "Introduction"
|
|
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 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 |
"Il s'agit d'une brève introduction à l'optimisation, à la fois le comment et "
|
|
Packit |
1470ea |
"le pourquoi. Le détail des outils et techniques individuels est reporté à "
|
|
Packit |
1470ea |
"des articles ultérieurs, mais une collection de trucs et astuces est fournie."
|
|
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 |
# quelle sera la meilleure traduction pour heap profiler ?
|
|
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 |
"Cet article décrit comment utiliser le profileur de tas<app>Massif</app> "
|
|
Packit |
1470ea |
"avec les applications GNOME. Nous décrivons comment appeler, interpréter et "
|
|
Packit |
1470ea |
"agir sur la sortie de <app>Massif</app>. Le jeu <app>Swell Foop</app> est "
|
|
Packit |
1470ea |
"utilisé comme un exemple."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: section/title
|
|
Packit |
1470ea |
#: C/index.page:53
|
|
Packit |
1470ea |
msgid "Harmfulness"
|
|
Packit |
1470ea |
msgstr "Ce qui est nuisible"
|
|
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'optimisons nous ?"
|
|
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 |
"Quand nous optimisons pour GNOME, voici une première chose dont il faut se "
|
|
Packit |
1470ea |
"souvenir : nous ne tentons pas d'améliorer un programme, nous essayons de "
|
|
Packit |
1470ea |
"mieux satisfaire l'utilisateur."
|
|
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 |
"Meilleur est le programme, plus les gens sont satisfaits, mais il est des "
|
|
Packit |
1470ea |
"améliorations qui les satisfont plus que d'autres : réactivité, temps de "
|
|
Packit |
1470ea |
"démarrage, facilité d'accès aux commandes et le fait de ne pas avoir "
|
|
Packit |
1470ea |
"l'ordinateur qui utilise la mémoire virtuelle dès que plus de deux "
|
|
Packit |
1470ea |
"programmes sont ouverts."
|
|
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 |
"Une optimisation traditionnelle s'attaque à des concepts comme l'utilisation "
|
|
Packit |
1470ea |
"de la CPU, la taille du code, le nombre de clics de souris et la mémoire "
|
|
Packit |
1470ea |
"utilisée par le programme. Cette deuxième énumération est corrélée avec "
|
|
Packit |
1470ea |
"celle de l'alinéa précédent, cependant il y a une différence importante : "
|
|
Packit |
1470ea |
"l'utilisateur de GNOME ne se soucie absolument pas des critères de cette "
|
|
Packit |
1470ea |
"deuxième énumération, mais beaucoup plus de ceux de la première. En "
|
|
Packit |
1470ea |
"optimisant les programmes GNOME, nous réduisons l'utilisation de la CPU, de "
|
|
Packit |
1470ea |
"la mémoire et beaucoup d'autres choses, mais ce sont des aboutissements et "
|
|
Packit |
1470ea |
"non des finalités. Nous optimisons pour les personnes."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: section/title
|
|
Packit |
1470ea |
#: C/introduction.page:18
|
|
Packit |
1470ea |
msgid "Doing the Optimization"
|
|
Packit |
1470ea |
msgstr "Réalisation d'une optimisation"
|
|
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 |
"Le paragraphe précédent a omis de citer un qualifiant important : on ne peut "
|
|
Packit |
1470ea |
"optimiser que ce qui est mesurable. La satisfaction n'est pas quantifiable. "
|
|
Packit |
1470ea |
"Mais, vous pouvez mesurer un temps de démarrage et dire si vous l'avez "
|
|
Packit |
1470ea |
"amélioré. Nous avons quelques espoirs qu'une satisfaction s'ensuive."
|
|
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 |
"L'optimisation est le processus de mesure, d'affinage et de mesure ànouveau. "
|
|
Packit |
1470ea |
"Donc la première chose que vous devez faire est de trouver un moyen de "
|
|
Packit |
1470ea |
"mesurer ce que vous optimisez. Idéalement, cette mesure est un nombre "
|
|
Packit |
1470ea |
"unique, par exemple : le temps nécessaire pour effectuer une tâche. C'est "
|
|
Packit |
1470ea |
"votre point de référence, c'est la seule façon de savoir si vous êtes "
|
|
Packit |
1470ea |
"gagnant ou perdant. Il y a une grande différence entre un programme qui "
|
|
Packit |
1470ea |
"devrait être rapide et un programme qui est rapide."
|
|
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 |
"Une fois que vous avez un point de référence, il faut savoir pourquoi le "
|
|
Packit |
1470ea |
"code ne fonctionne pas aussi bien qu'il le devrait. Il est tentant de le "
|
|
Packit |
1470ea |
"faire par inspection : en regardant simplement le code pour essayer de "
|
|
Packit |
1470ea |
"repérer quelque chose d'améliorable. Vous serez invariablement dans "
|
|
Packit |
1470ea |
"l'erreur. La seule façon d'être sûr est d'utiliser un profileur pour obtenir "
|
|
Packit |
1470ea |
"la décomposition détaillée de ce que votre programme fait réellement."
|
|
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 |
"Habituellement vous cernerez les problèmes dans de petites portions de code. "
|
|
Packit |
1470ea |
"Repérez la pire et centrez votre attention d'abord sur elle. Quand vous avez "
|
|
Packit |
1470ea |
"terminé, relancez le profileur et recommencez. À mesure que vous avancez, "
|
|
Packit |
1470ea |
"les progrès réalisés à chaque étape sont de plus en plus faibles, jusqu'au "
|
|
Packit |
1470ea |
"moment où vous aurez à décider si les résultats sont assez bons. Si vos "
|
|
Packit |
1470ea |
"efforts aboutissent à ne serait-ce que 10 % d'améliorations, alors vous êtes "
|
|
Packit |
1470ea |
"bien au delà du point où vous auriez pu vous arrêter."
|
|
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 |
"Ayez une vue d'ensemble. Par exemple, plutôt que d'essayer de rendre plus "
|
|
Packit |
1470ea |
"rapide un morceau du code, demandez-vous plutôt s'il doit être exécuté. Peut-"
|
|
Packit |
1470ea |
"il être combiné avec une autre partie de code ? Les résultats de calculs "
|
|
Packit |
1470ea |
"antérieurs peuvent-ils être sauvegardés et réutilisés ? Ce code a-t-il même "
|
|
Packit |
1470ea |
"besoin d'être optimisé, s'il est à un endroit où l'utilisateur ne va jamais "
|
|
Packit |
1470ea |
"le parcourir ? Pire encore, le code peut déjà avoir été optimisé et "
|
|
Packit |
1470ea |
"effectuer maintenant des calculs lourds pour éviter d'avoir à les faire plus "
|
|
Packit |
1470ea |
"tard. Un morceau de code ne s'exécute pas isolément, pas plus que le "
|
|
Packit |
1470ea |
"processus d'optimisation."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: section/title
|
|
Packit |
1470ea |
#: C/introduction.page:37
|
|
Packit |
1470ea |
msgid "Hints"
|
|
Packit |
1470ea |
msgstr "Conseils pratiques"
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: item/title
|
|
Packit |
1470ea |
#: C/introduction.page:41
|
|
Packit |
1470ea |
msgid "The Fundamentals"
|
|
Packit |
1470ea |
msgstr "Les Fondamentaux"
|
|
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 |
"Relancez le test de performance après chaque changement apporté au code ; "
|
|
Packit |
1470ea |
"gardez un journal de toutes les modifications en notant la manière dont "
|
|
Packit |
1470ea |
"elles affectent le test de performance. Procéder ainsi vous permet d'annuler "
|
|
Packit |
1470ea |
"les erreurs et vous aide à ne pas les répéter."
|
|
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 |
"Assurez vous que le code est correct et ne contient pas de bogues avant de "
|
|
Packit |
1470ea |
"l'optimiser. Vérifiez qu'il est toujours correct et sans bogues après "
|
|
Packit |
1470ea |
"optimisation."
|
|
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 "Optimisez au général avant d'optimiser les détails."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# A corriger, je ne comprends pas comment traduire quick sort et bubble sort.
|
|
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 |
"Utilisez le bon algorithme. L'exemple classique des ouvrages est de "
|
|
Packit |
1470ea |
"conseiller l'utilisation d'un tri rapide plutôt qu'un tri à bulle. Il en "
|
|
Packit |
1470ea |
"existe beaucoup d'autres, certains économisent la mémoire, d'autres la CPU. "
|
|
Packit |
1470ea |
"Également, voyez quels sont les raccourcis possibles : vous pouvez faire "
|
|
Packit |
1470ea |
"plus rapide que le tri rapide si vous êtes prêt à quelques compromis."
|
|
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 |
"L'optimisation est un arbitrage. Mettre en cache des résultats accélère les "
|
|
Packit |
1470ea |
"calculs, mais augmente l'utilisation de la mémoire. Enregistrer les données "
|
|
Packit |
1470ea |
"sur disque économise la mémoire, mais prend plus de temps quand il faut les "
|
|
Packit |
1470ea |
"rappeler."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# la première phrase ?
|
|
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 |
"Mettez en concurrence les optimisations sur un large éventail d'entrées. À "
|
|
Packit |
1470ea |
"défaut, il est courant de se retrouver avec une portion de code "
|
|
Packit |
1470ea |
"soigneusement optimisée pour un fichier donné et pas les autres."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# A vérifier, je n'ai pas bien compris la deuxième phrase.
|
|
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 |
"Évitez des opérations coûteuses : la multiplication de petites lectures sur "
|
|
Packit |
1470ea |
"les disques, l'utilisation de grosses quantités de mémoire qui nécessitent "
|
|
Packit |
1470ea |
"l'emploi de la mémoire virtuelle, les écritures ou lectures inutiles sur "
|
|
Packit |
1470ea |
"disque dur. Le réseau est également lent. Évitez aussi les opérations "
|
|
Packit |
1470ea |
"graphiques qui ont besoin d'une réponse du serveur 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 "Pièges pour imprudents"
|
|
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 |
"Méfiez-vous des effets collatéraux. Il y a souvent d'étranges interactions "
|
|
Packit |
1470ea |
"entre diverses parties du code, l'accélération d'une partie peut ralentir "
|
|
Packit |
1470ea |
"l'autre."
|
|
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 |
"Pendant le chronométrage du temps, même sur un système peu chargé, les "
|
|
Packit |
1470ea |
"événements en dehors du programme ajoutent du bruit au résultat. Moyennez-"
|
|
Packit |
1470ea |
"les sur plusieurs exécutions. Si le code est très court, la résolution du "
|
|
Packit |
1470ea |
"chronomètre peut devenir aussi un problème. Dans ce cas, mesurez le temps "
|
|
Packit |
1470ea |
"que l'ordinateur met pour exécuter le code 100 ou 1000 fois. Si le temps que "
|
|
Packit |
1470ea |
"vous enregistrez est plus long que quelques secondes, cela devrait être "
|
|
Packit |
1470ea |
"correct."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# une meilleure traduction pour idle-loop ?
|
|
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 |
"Il est très facile d'être induit en erreur par le profileur. On raconte des "
|
|
Packit |
1470ea |
"histoires de personnes optimisant la boucle d'attente du système "
|
|
Packit |
1470ea |
"d'exploitation parce que c'est là que l'ordinateur passait tout son temps ! "
|
|
Packit |
1470ea |
"N'optimisez pas le code des choses dont l'utilisateur n'a rien à faire."
|
|
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 |
"N'oubliez pas les ressources sur le serveur X. Le décompte de la mémoire "
|
|
Packit |
1470ea |
"utilisée par votre programme ne comprend pas les images <literal>pixmap</"
|
|
Packit |
1470ea |
"literal> stockées par les processus du serveur X, mais ces images dépensent "
|
|
Packit |
1470ea |
"encore de la mémoire. Utilisez <application>xrestop</application> pour "
|
|
Packit |
1470ea |
"prendre connaissance des ressources utilisées par votre programme."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: item/title
|
|
Packit |
1470ea |
#: C/introduction.page:106
|
|
Packit |
1470ea |
msgid "Low Level Hints"
|
|
Packit |
1470ea |
msgstr "Conseils niveau système"
|
|
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 |
"Quand vous optimisez l'utilisation de la mémoire, faites la différence entre "
|
|
Packit |
1470ea |
"usage de crête et usage moyen. Que de la mémoire soit allouée de manière "
|
|
Packit |
1470ea |
"pratiquement permanente est en règle générale mauvais. Que de la mémoire "
|
|
Packit |
1470ea |
"soit allouée sur de brèves périodes est tout à fait acceptable . Des outils "
|
|
Packit |
1470ea |
"comme <application>massif</application> utilisent plutôt le concept "
|
|
Packit |
1470ea |
"espace*temps, produit de la mémoire utilisée multiplié par la durée de son "
|
|
Packit |
1470ea |
"allocation."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# à revoir !
|
|
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 |
"Chronométrez des portions de code simplifiées qui n'exécutent que les choses "
|
|
Packit |
1470ea |
"que vous savez être essentielles ; vous obtiendrez ainsi une limite "
|
|
Packit |
1470ea |
"inférieure absolue du temps que votre code prendra. Par exemple, pour "
|
|
Packit |
1470ea |
"optimiser une boucle, chronométrez la boucle d'attente. Si elle est encore "
|
|
Packit |
1470ea |
"trop longue, les micro-optimisations, aussi nombreuses soient-elles, ne vous "
|
|
Packit |
1470ea |
"seront d'aucun secours : vous devez modifier votre conception. Assurez-vous "
|
|
Packit |
1470ea |
"que le compilateur n'a pas optimisé par ailleurs votre boucle d'attente."
|
|
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 |
"Déplacez le code en dehors des boucles. Une portion de code légèrement plus "
|
|
Packit |
1470ea |
"complexe exécutée une seule fois est beaucoup plus rapide qu'une portion de "
|
|
Packit |
1470ea |
"code simple exécutée une centaine de fois. Évitez d'appeler trop souvent du "
|
|
Packit |
1470ea |
"code lent."
|
|
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 |
"Utilisez toutes les astuces possibles avec le compilateur. Servez-vous du "
|
|
Packit |
1470ea |
"mot-clé <literal>const</literal>, et de <envar>G_INLINE_FUNC</envar> pour "
|
|
Packit |
1470ea |
"les fonctions courtes fréquemment appelées. Envisagez l'utilisation de "
|
|
Packit |
1470ea |
"<envar>G_GNUC_PURE</envar>, <envar>G_LIKELY</envar> et d'autres macros de "
|
|
Packit |
1470ea |
"<literal>glib</literal>. Utilisez les macros au lieu des mots-clés "
|
|
Packit |
1470ea |
"spécifiques à <application>gcc</application> pour assurer la portabilité."
|
|
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 |
"N'utilisez pas le langage assembleur. Il n'est pas portable et, quand il est "
|
|
Packit |
1470ea |
"plus rapide sur un processeur, ce n'est pas garanti qu'il le soit sur tous "
|
|
Packit |
1470ea |
"les processeurs qui supportent cette architecture (par ex. Athlon versus "
|
|
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 |
"Ne réécrivez pas une routine existante de bibliothèque, à moins d'être sûr "
|
|
Packit |
1470ea |
"qu'elle est inutilement lente. Beaucoup de routines de bibliothèques "
|
|
Packit |
1470ea |
"utilisant intensivement la CPU ont déjà été optimisées. Inversement, "
|
|
Packit |
1470ea |
"certaines routines de bibliothèque sont lentes, en particulier celles "
|
|
Packit |
1470ea |
"faisant appel au système d'exploitation."
|
|
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 |
"Minimisez le nombre de bibliothèques auxquelles vous liez votre code. Moins "
|
|
Packit |
1470ea |
"il y a de bibliothèques à lier, plus le programme se lancera rapidement. Ce "
|
|
Packit |
1470ea |
"n'est pas facile à faire avec GNOME."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: item/title
|
|
Packit |
1470ea |
#: C/introduction.page:146
|
|
Packit |
1470ea |
msgid "High Level Tricks"
|
|
Packit |
1470ea |
msgstr "Astuces niveau abstractions"
|
|
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 |
"Utilisez la concomitance. Ce conseil ne vise pas uniquement la simultanéité "
|
|
Packit |
1470ea |
"des processus multiples, mais le fait qu'il faut mettre à profit le temps "
|
|
Packit |
1470ea |
"que l'utilisateur passe à réfléchir à ses actions futures pour anticiper "
|
|
Packit |
1470ea |
"quelques calculs. Faites des opérations en attendant le chargement des "
|
|
Packit |
1470ea |
"données disque. Exploitez la multiplicité des ressources, utilisez-les "
|
|
Packit |
1470ea |
"toutes ensemble."
|
|
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 |
"Trichez. L'utilisateur doit imaginer un ordinateur rapide, aucune importance "
|
|
Packit |
1470ea |
"qu'il le soit effectivement ou non. L'important est le délai entre commande "
|
|
Packit |
1470ea |
"et réponse ; peu importe que la réponse soit calculée par avance, en cache "
|
|
Packit |
1470ea |
"ou mise au point plus tard à un moment plus opportun pourvu que "
|
|
Packit |
1470ea |
"l'utilisateur obtienne ce qu'il attend."
|
|
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 |
"Faites quelque chose pendant la boucle d'attente. C'est plus facile à "
|
|
Packit |
1470ea |
"programmer qu'une pleine utilisation de processus multiples, mais faites "
|
|
Packit |
1470ea |
"toujours faire les choses hors de la vue de l'utilisateur. Attention "
|
|
Packit |
1470ea |
"cependant, si vous passez trop de temps dans la boucle d'attente, votre "
|
|
Packit |
1470ea |
"programme deviendra mollasson. Donc, redonnez régulièrement le contrôle à la "
|
|
Packit |
1470ea |
"boucle principale."
|
|
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 tout ce qui précède échoue, avouez à l'utilisateur que le code est lent "
|
|
Packit |
1470ea |
"et programmez une barre de progression. Ils ne seront pas aussi satisfaits "
|
|
Packit |
1470ea |
"que par la présentation des résultats, mais ils sauront au moins que le "
|
|
Packit |
1470ea |
"programme ne s'est pas arrêté brutalement et qu'ils peuvent aller chercher "
|
|
Packit |
1470ea |
"une tasse de café."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# Après avoir regarder l'image original, il est indiqué que c'est une image technique donc qui n'a pas à être traduite.
|
|
Packit |
1470ea |
# Je met dans la version française l'image d'origine, si cela ne convient je ferais une version française de l'mage
|
|
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 |
# Après avoir regarder l'image original, il est indiqué que c'est une image technique donc qui n'a pas à être traduite.
|
|
Packit |
1470ea |
# Je met dans la version française l'image d'origine, si cela ne convient je ferais une version française de l'mage
|
|
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 |
"Utilisation de <app>Massif</app>pour profiler l'utilisation de la mémoire "
|
|
Packit |
1470ea |
"des logiciels GNOME."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# bonne traduction de heap ?
|
|
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> fait partie de la suite d'outils de profilage mémoire "
|
|
Packit |
1470ea |
"<link href=\"http://valgrind.org/\">valgrind</link>. Son but est de donner "
|
|
Packit |
1470ea |
"une vue détaillée de l'utilisation de mémoire dynamique pendant la durée du "
|
|
Packit |
1470ea |
"programme. Plus précisément, il enregistre l'utilisation de la mémoire du "
|
|
Packit |
1470ea |
"tas et la pile."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# traduction heap ?
|
|
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 |
"Le tas est une zone mémoire dans laquelle des fonctions comme "
|
|
Packit |
1470ea |
"<function>malloc</function> font leurs allocations. Le tas augmente à la "
|
|
Packit |
1470ea |
"demande et est généralement la plus grande zone mémoire d'un programme. La "
|
|
Packit |
1470ea |
"pile est l'endroit où toutes les données locales des fonctions sont "
|
|
Packit |
1470ea |
"stockées, y compris les variables « automatiques » du C et l'adresse de "
|
|
Packit |
1470ea |
"retour des sous-programmes. La pile est habituellement beaucoup plus petite "
|
|
Packit |
1470ea |
"et beaucoup plus active que le tas. Nous ne la prendrons pas explicitement "
|
|
Packit |
1470ea |
"en considération puisque <application>Massif</application> traite la pile "
|
|
Packit |
1470ea |
"comme faisant partie du tas. <application>Massif</application> fournit "
|
|
Packit |
1470ea |
"également des informations sur les quantités de mémoire utilisées pour la "
|
|
Packit |
1470ea |
"gestion du tas."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
# de nombreuses traductions possibles pour breakdown, répartiton la mieux ?
|
|
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> produit deux fichiers de sortie: un aperçu graphique dans "
|
|
Packit |
1470ea |
"un fichier postscript et une analyse détaillée dans un fichier texte."
|
|
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 "Utilisation de <app>Massif</app> avec 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> a très peu d'options et de nombreux programmes n'en ont "
|
|
Packit |
1470ea |
"pas besoin. Toutefois, pour les applications GNOME, où l'allocation de "
|
|
Packit |
1470ea |
"mémoire pourrait être profondément enfouies dans glib ou GTK, le nombre de "
|
|
Packit |
1470ea |
"niveaux de la pile des appels où Massif descend doit être augmenté. Ce "
|
|
Packit |
1470ea |
"résultat est obtenu en utilisant le paramètre --depth. Par défaut c'est 3 ; "
|
|
Packit |
1470ea |
"l'augmenter à 5 garantira la pile d'appel descend jusqu'à votre code. Un ou "
|
|
Packit |
1470ea |
"deux autres niveaux peuvent également être souhaitable pour fournir à votre "
|
|
Packit |
1470ea |
"un certain contexte. Puisque le niveau de détail devient rapidement "
|
|
Packit |
1470ea |
"excessif, il est préférable de commencer avec un paramètre de profondeur "
|
|
Packit |
1470ea |
"faible et de ne l'augmenter que lorsqu'il devient évident qu'il n'est pas "
|
|
Packit |
1470ea |
"suffisant."
|
|
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 |
"Il est également utile d'indiquer à <application>Massif</application> "
|
|
Packit |
1470ea |
"quelles fonctions allouent de la mémoire dans <literal>glib</literal>. Cette "
|
|
Packit |
1470ea |
"indication supprime une couche superflue d'appels de fonctions dans les "
|
|
Packit |
1470ea |
"rapports et permet d'avoir une idée plus claire sur les parties de code qui "
|
|
Packit |
1470ea |
"allouent de la mémoire. Les fonctions d'allocation dans <literal>glib</"
|
|
Packit |
1470ea |
"literal> sont : <function>g_malloc</function>, <function>g_malloc0</"
|
|
Packit |
1470ea |
"function>, <function>g_realloc</function>, <function>g_try_malloc</function> "
|
|
Packit |
1470ea |
"et <function>g_mem_chunk_alloc</function>. Utilisez l'option <option>--alloc-"
|
|
Packit |
1470ea |
"fn</option> pour les indiquer à <application>Massif</application>."
|
|
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 ""
|
|
Packit |
1470ea |
"Votre ligne de commande devrait par conséquent ressembler à quelque chose "
|
|
Packit |
1470ea |
"comme :"
|
|
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> est le programme que nous allons utiliser comme "
|
|
Packit |
1470ea |
"exemple. Sachez que, puisque valgrind émule le CPU, il fonctionne très</"
|
|
Packit |
1470ea |
"em> lentement. Vous aurez aussi besoin de beaucoup de mémoire."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: section/title
|
|
Packit |
1470ea |
#: C/massif.page:41
|
|
Packit |
1470ea |
msgid "Interpreting the Results"
|
|
Packit |
1470ea |
msgstr "Interprétation des résultats"
|
|
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 sortie graphique de <app>Massif</app> est tout à fait explicite. Chaque "
|
|
Packit |
1470ea |
"bande représente la mémoire allouée par une fonction au fil du temps. Après "
|
|
Packit |
1470ea |
"avoir identifié les bandes qui utilisent le plus de mémoire, généralement "
|
|
Packit |
1470ea |
"les plus épaisses en haut, vous devez consulter le fichier texte pour les "
|
|
Packit |
1470ea |
"détails."
|
|
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 |
"Le fichier texte est constitué de paragraphes hiérarchisés, avec en tête de "
|
|
Packit |
1470ea |
"liste les utilisateurs de mémoire les plus gourmands rangés en ordre "
|
|
Packit |
1470ea |
"décroissant d'espace*temps. Au dessous se trouvent d'autres paragraphes ; "
|
|
Packit |
1470ea |
"chacun analyse les résultats de plus en plus finement au fur et à mesure que "
|
|
Packit |
1470ea |
"vous vous enfoncez dans les profondeurs de la pile des appels de fonctions. "
|
|
Packit |
1470ea |
"Pour illustrer cela, nous utiliserons la sortie de la commande précédente."
|
|
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 |
"Sortie de <app>Massif</app> pour la version non optimisée du programme "
|
|
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 |
"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 |
"L'image ci-dessus montre une "
|
|
Packit |
1470ea |
"sortie postscript typique de <app>Massif</app>. C'est le résultat que vous "
|
|
Packit |
1470ea |
"obtiendriez en jouant une partie à un joueur de <app>Foop Houle</app> "
|
|
Packit |
1470ea |
"(version 2.8.0), et en quittant. Le fichier postscript aura un nom comme "
|
|
Packit |
1470ea |
"<file>massif.12345.ps</file> et le fichier texte sera appelé "
|
|
Packit |
1470ea |
"<file>massif.12345.txt</file>. Le nombre du milieu est l'identifiant (ID) du "
|
|
Packit |
1470ea |
"processus correspondant au programme examiné. Si vous testez réellement cet "
|
|
Packit |
1470ea |
"exemple, vous obtiendrez deux versions de chaque fichier, avec des nombres "
|
|
Packit |
1470ea |
"légèrement différents. C'est parce que <app>Foop Swell</app> lance un "
|
|
Packit |
1470ea |
"deuxième processus que <app>Massif</app> analyse également. Nous allons "
|
|
Packit |
1470ea |
"ignorer ce deuxième processus, car il consomme très peu de mémoire."
|
|
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 haut du graphique, est affichée une grande bande jaune étiquetée "
|
|
Packit |
1470ea |
"<literal>gdk_pixbuf_new</literal>. Elle semble être la candidate idéale pour "
|
|
Packit |
1470ea |
"une optimisation, mais nous avons besoin d'utiliser le fichier texte pour "
|
|
Packit |
1470ea |
"savoir qui appelle <literal>gdk_pixbuf_new</literal>. En tête du fichier "
|
|
Packit |
1470ea |
"texte, il y a quelque chose comme :"
|
|
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 |
"Le numéro dans la ligne avec les signes « = » indique la profondeur "
|
|
Packit |
1470ea |
"d'imbrication dans la pile des appels de fonctions où nous nous trouvons ; "
|
|
Packit |
1470ea |
"dans notre cas, nous sommes au sommet. Suit la liste des utilisateurs "
|
|
Packit |
1470ea |
"d'espace*temps mémoire du plus gourmand au moins gourmand. L'espace*temps "
|
|
Packit |
1470ea |
"mémoire représente la quantité de mémoire occupée multipliée par le temps "
|
|
Packit |
1470ea |
"d'utilisation. Il correspond à la surface des bandes sur le graphe. Cette "
|
|
Packit |
1470ea |
"première partie du fichier texte confirme ce que nous savions déjà : le gros "
|
|
Packit |
1470ea |
"de l'espace*temps est occupé par <literal>gdk_pixbuf_new</literal>. Pour "
|
|
Packit |
1470ea |
"savoir qui appelle <literal>gdk_pixbuf_new</literal>, il est nécessaire de "
|
|
Packit |
1470ea |
"rechercher plus bas dans le fichier texte :"
|
|
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 première ligne indique que nous nous trouvons au quatrième niveau dans la "
|
|
Packit |
1470ea |
"profondeur de pile. Au dessous, suit une liste des appels de fonctions "
|
|
Packit |
1470ea |
"menant de ce point à gdk_pixbuf_new. Enfin, vient une liste des fonctions "
|
|
Packit |
1470ea |
"situées au niveau immédiatement inférieur appelant ces fonctions. Bien "
|
|
Packit |
1470ea |
"entendu, les entrées pour les niveaux 1, 2 et 3 existent, mais le 4 est le "
|
|
Packit |
1470ea |
"premier niveau qui arrive directement jusqu'au code GDK de "
|
|
Packit |
1470ea |
"<application>Swell Foop</application>. À partir de cette liste, nous voyons "
|
|
Packit |
1470ea |
"instantanément que le problème se situe au niveau du code de "
|
|
Packit |
1470ea |
"<function>load_scenario</function>."
|
|
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 |
"Maintenant que nous connaissons la partie du code qui utilise tout "
|
|
Packit |
1470ea |
"l'espace*temps mémoire, nous pouvons l'examiner et rechercher pourquoi. Il "
|
|
Packit |
1470ea |
"s'avère que <literal>load_scenario</literal> charge une image "
|
|
Packit |
1470ea |
"<literal>pixbuf</literal> à partir d'un fichier, puis ne libère jamais cette "
|
|
Packit |
1470ea |
"mémoire. Ayant identifié le code à problème, nous pouvons corriger."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: section/title
|
|
Packit |
1470ea |
#: C/massif.page:110
|
|
Packit |
1470ea |
msgid "Acting on the Results"
|
|
Packit |
1470ea |
msgstr "Modification des résultats"
|
|
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 |
"Réduire la consommation d'espace*temps mémoire est une bonne chose, mais il "
|
|
Packit |
1470ea |
"y a deux façons de faire et elles ne sont pas égales. Vous pouvez, soit "
|
|
Packit |
1470ea |
"réduire la quantité de mémoire allouée, soit réduire la durée d'allocation. "
|
|
Packit |
1470ea |
"Considérons un instant un système théorique avec uniquement deux processus "
|
|
Packit |
1470ea |
"en cours. Ces deux processus utilisent tous deux pratiquement la totalité de "
|
|
Packit |
1470ea |
"la mémoire RAM physique ; s'ils se superposent pleinement, alors le système "
|
|
Packit |
1470ea |
"va utiliser la partition de mémoire virtuelle et tout va ralentir. Il est "
|
|
Packit |
1470ea |
"évident que, si nous divisons par deux la quantité de mémoire utilisée par "
|
|
Packit |
1470ea |
"chaque processus, ils peuvent paisiblement coexister sans avoir besoin de "
|
|
Packit |
1470ea |
"l'utiliser. Si, au lieu de cela, nous divisons par deux les durées "
|
|
Packit |
1470ea |
"d'allocation mémoire, les deux programmes peuvent coexister, toujours sans "
|
|
Packit |
1470ea |
"virtualiser la mémoire, mais uniquement tant que leurs périodes "
|
|
Packit |
1470ea |
"d'utilisation de la mémoire haute ne se chevauchent pas. Réduire la quantité "
|
|
Packit |
1470ea |
"de mémoire allouée est donc préférable."
|
|
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 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 |
"Hélas, les choix d'une optimisation sont également contraints par les "
|
|
Packit |
1470ea |
"besoins du programme. La taille des données de pixbuf de <app>Swell Foop</"
|
|
Packit |
1470ea |
"app> est déterminée par la taille des graphiques du jeu et ne peut pas être "
|
|
Packit |
1470ea |
"facilement réduite. Toutefois, la durée de chargement de l'image pixbuf en "
|
|
Packit |
1470ea |
"mémoire peut être réduite de manière drastique. L'image ci-dessus affiche "
|
|
Packit |
1470ea |
"l'analyse par <app>Massif</app> de "
|
|
Packit |
1470ea |
"l'application <app>Swell Foop</app> modifiée pour se débarrasser du "
|
|
Packit |
1470ea |
"<literal>pixbuf</literal> une fois que les images ont été chargées dans le "
|
|
Packit |
1470ea |
"serveur 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 |
"Sortie de <app>Massif</app> pour la version optimisée du programme "
|
|
Packit |
1470ea |
"<app>Swell Foop</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 |
"L'espace*temps utilisé par <literal>gdk_pixbuf_new</literal> n'est "
|
|
Packit |
1470ea |
"maintenant plus qu'une fine bande qui pointe brièvement (c'est maintenant la "
|
|
Packit |
1470ea |
"seizième bande à partir du haut colorée en magenta). En prime, le pic de "
|
|
Packit |
1470ea |
"mémoire s'est affaissé de 200 Ko étant donné que la pointe de demande "
|
|
Packit |
1470ea |
"intervient avant les autres allocations mémoire. Si deux processus tels que "
|
|
Packit |
1470ea |
"celui-ci étaient lancés simultanément, les chances pour les pics "
|
|
Packit |
1470ea |
"d'utilisation mémoire coïncident, et en conséquence, les risques "
|
|
Packit |
1470ea |
"d'utilisation de la mémoire virtuelle, seraient très faibles."
|
|
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 |
"Pouvons-nous faire mieux? Un examen rapide du texte de sortie de "
|
|
Packit |
1470ea |
"<app>Massif</app> révèle que g_strdup serait maintenant le nouveau coupable."
|
|
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 nous regardons de plus près, nous voyons qu'il est appelé en de très, "
|
|
Packit |
1470ea |
"très nombreux endroits."
|
|
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 |
# une bonne traduction pour heap admin ?
|
|
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 |
"Nous voila maintenant confrontés à la diminution du rendement de nos efforts "
|
|
Packit |
1470ea |
"d'optimisation. Le graphique suggère une autre approche possible : les deux "
|
|
Packit |
1470ea |
"bandes <literal>other</literal> et <literal>heap admin</literal> sont "
|
|
Packit |
1470ea |
"relativement importantes. C'est la marque d'une multitude de petites "
|
|
Packit |
1470ea |
"allocations réalisées à divers endroits. Les éliminer est difficile, mais "
|
|
Packit |
1470ea |
"s'il est possible de les regrouper, les allocations unitaires seront plus "
|
|
Packit |
1470ea |
"grandes et le temps système du <literal>heap admin</literal> en sera réduit."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#. (itstool) path: section/title
|
|
Packit |
1470ea |
#: C/massif.page:171
|
|
Packit |
1470ea |
msgid "Caveats"
|
|
Packit |
1470ea |
msgstr "Avertissements"
|
|
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 |
"Il faut faire attention à deux choses : d'une part, la quantité espace*temps "
|
|
Packit |
1470ea |
"est uniquement restituée en pourcentage ; il faut la rapporter à la taille "
|
|
Packit |
1470ea |
"globale du programme pour décider si la quantité de mémoire mérite une "
|
|
Packit |
1470ea |
"optimisation. L'axe vertical du graphique, gradué en kilo-octets, vous "
|
|
Packit |
1470ea |
"aidera à prendre cette décision."
|
|
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 |
"D'autre part, <app>Massif</app> ne prend en compte que la mémoire utilisée "
|
|
Packit |
1470ea |
"par votre programme. Des ressources telles que les images sont stockées dans "
|
|
Packit |
1470ea |
"le serveur X et ne sont pas prise en considération par<app>Massif</app>. "
|
|
Packit |
1470ea |
"Dans l'exemple <app>Swell Foop</app> nous n'avons fait que déplacer la "
|
|
Packit |
1470ea |
"consommation de mémoire des images pixbufs côté client vers les images "
|
|
Packit |
1470ea |
"pixmaps côté serveur. Même si nous avons triché, nous obtenons des gains de "
|
|
Packit |
1470ea |
"performance. Garder les données d'image dans le serveur X rend les routines "
|
|
Packit |
1470ea |
"graphiques rapides et supprime beaucoup de communications entre les "
|
|
Packit |
1470ea |
"processus. En outre, les pixmaps seront stockées dans un format graphique "
|
|
Packit |
1470ea |
"natif qui est souvent plus compact que le format RGBA 32 bits utilisé par "
|
|
Packit |
1470ea |
"gdk_pixbuf. Pour mesurer l'incidence de pixmaps et autres ressources X, "
|
|
Packit |
1470ea |
"utilisez le programme
|
|
Packit |
1470ea |
"xrestop\">xrestop</link>."
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#~ msgid "The Quick Guide to Optimizing GNOME Programs"
|
|
Packit |
1470ea |
#~ msgstr "Le guide rapide pour optimiser les programmes GNOME"
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#~ msgid "Optimizing GNOME Software"
|
|
Packit |
1470ea |
#~ msgstr "Optimisation d'un logiciel GNOME"
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
#~ msgid "GNOME Documentation Project"
|
|
Packit |
1470ea |
#~ msgstr "Projet de Documentation 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 "Novembre 2007"
|
|
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 "Conversion initiale au format docbook."
|