1# Slovenian translation for gnome-devel-docs.
2# Copyright (C) 2010 gnome-devel-docs's COPYRIGHT HOLDER
3# This file is distributed under the same license as the gnome-devel-docs package.
4#
5# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
6#
7msgid ""
8msgstr ""
9"Project-Id-Version: gnome-devel-docs-og help master\n"
10"POT-Creation-Date: 2010-10-14 16:41+0000\n"
11"PO-Revision-Date: 2010-10-17 20:48+0100\n"
12"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
13"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
18"X-Poedit-Language: Slovenian\n"
19"X-Poedit-Country: SLOVENIA\n"
20"X-Poedit-SourceCharset: utf-8\n"
21
22#: C/optimization-intro.xml:3(title)
23msgid "The Quick Guide to Optimizing GNOME Programs"
24msgstr ""
25
26#: C/optimization-intro.xml:5(para)
27msgid "This is a brief introduction to optimization, both the hows and the whys. Details of individual tools and techniques are left for later articles, but a collection of hints and tricks is provided."
28msgstr ""
29
30#: C/optimization-intro.xml:10(title)
31msgid "What are we Optimizing?"
32msgstr ""
33
34#: C/optimization-intro.xml:11(para)
35msgid "When we optimize for GNOME the first thing to remember is this: we are not trying to make the program better, we are trying to make the person using the computer happier."
36msgstr ""
37
38#: C/optimization-intro.xml:14(para)
39msgid "Better programs make people happier, but there are some improvements that will make them a lot happier than others: Responsiveness, start-up time, easy to access commands and not having the computer go into swap the moment more than two programs are open."
40msgstr ""
41
42#: C/optimization-intro.xml:17(para)
43msgid "Traditional optimization tackles concepts like CPU use, code size, the number of mouse clicks and the memory use of the program. This second list has been chosen to correlate with the first list, however there is an important difference: The person using GNOME doesn't care about the second list, but they care a lot about the first list. When optimizing GNOME programs we will reduce CPU use, memory use and all those things, but these are the means to the end, not the final goal. We are optimizing for people."
44msgstr ""
45
46#: C/optimization-intro.xml:23(title)
47msgid "Doing the Optimization"
48msgstr ""
49
50#: C/optimization-intro.xml:24(para)
51msgid "The previous section omitted one important qualifier: To optimize something it has to be measurable. You can't measure happiness. However, you can measure start-up time so you can tell if you have improved it. Happiness will then, hopefully, follow."
52msgstr ""
53
54#: C/optimization-intro.xml:27(para)
55msgid "Optimization is the process of measurement, refinement and re-measurement. So the first thing you must do is find a way to measure what you are optimizing. Ideally this measurement is a single number, for example: the time taken to perform a task. This is your benchmark, it is the only way to tell if you are winning or losing. There is a big difference between a program that <emphasis>should</emphasis> be fast and a program that <emphasis>is</emphasis> fast."
56msgstr ""
57
58#: C/optimization-intro.xml:30(para)
59msgid "Once you have a basic benchmark you need to find out why your code is not doing as well as it should. It is tempting to do this by inspection: just looking at the code and trying to spot something that looks like it needs improvement. You will invariably be wrong. Using a profiler to get a detailed break-down of what your program really does is the only way to be sure."
60msgstr ""
61
62#: C/optimization-intro.xml:33(para)
63msgid "Usually the problem is isolated to small sections of code. Pick the worst place and concentrate on that first. Once that is done, rerun the profiler and repeat. As you proceed the gains made at each step will get less and less, at some point you will have to decide that the results are good enough. If your efforts are only extracting 10% improvements then you are well past the point where you should have stopped."
64msgstr ""
65
66#: C/optimization-intro.xml:36(para)
67msgid "Don't forget the big picture. For example, rather than just trying to speed up a piece of code, ask yourself if it needs to be run at all. Could it be combined with another piece of code? Can the results of previous calculations be saved and reused? It won't even need to be optimized if it is in a place where the user is never going to notice it. Worse still, the code may already be optimized and is doing the heavy calculations now to avoid doing them later. Code does not run in isolation and neither does the optimization process."
68msgstr ""
69
70#: C/optimization-intro.xml:41(title)
71msgid "Hints"
72msgstr "Namigi"
73
74#: C/optimization-intro.xml:43(title)
75msgid "The Fundamentals"
76msgstr ""
77
78#: C/optimization-intro.xml:45(para)
79msgid "Re-run your benchmark after every change you make to the code and keep a log of everything you change and how it affects the benchmark. This lets you undo mistakes and also helps you not to repeat mistakes."
80msgstr ""
81
82#: C/optimization-intro.xml:50(para)
83msgid "Make sure your code is correct and bug-free before optimizing it. Check that it remains correct and bug-free after optimization."
84msgstr ""
85
86#: C/optimization-intro.xml:55(para)
87msgid "Optimize at the high level before optimizing the details."
88msgstr ""
89
90#: C/optimization-intro.xml:60(para)
91msgid "Use the right algorithm. The classic text-book example is using quick-sort instead of bubble-sort. There are many others, some save memory, some save CPU. Also, see what shortcuts you can make: you can do quicker than quick-sort if you are prepared to make some compromises."
92msgstr ""
93
94#: C/optimization-intro.xml:65(para)
95msgid "Optimization is a trade-off. Caching results speeds up calculations, but increases memory use. Saving data to disk saves memory, but costs time when it is loaded back from disk."
96msgstr ""
97
98#: C/optimization-intro.xml:70(para)
99msgid "Make sure you choose a wide variety of inputs to optimize against. If you don't it is easy to end up with a piece of code carefully optimized for one file and no others."
100msgstr ""
101
102#: C/optimization-intro.xml:75(para)
103msgid "Avoid expensive operations: Multiple small disk reads. Using up lots of memory so disk swapping becomes necessary. Avoid anything that writes or reads from the hard disk unnecessarily. The network is slow too. Also avoid graphics operations that need a response from the X server."
104msgstr ""
105
106#: C/optimization-intro.xml:81(title)
107msgid "Traps for the Unwary"
108msgstr ""
109
110#: C/optimization-intro.xml:83(para)
111msgid "Beware of side effects. There can often be strange interactions between different sections of code, a speed-up in one part can slow another part down."
112msgstr ""
113
114#: C/optimization-intro.xml:88(para)
115msgid "When timing code, even on a quiet system, events outside the program add noise to the timing results. Average over multiple runs. If the code is very short, timer resolution is also a problem. In this case measure the time the computer takes to run the code 100 or 1000 times. If the times you are recording are longer than a few seconds, you should be OK."
116msgstr ""
117
118#: C/optimization-intro.xml:93(para)
119msgid "It is very easy to be misled by the profiler. There are stories of people optimizing the operating system idle-loop because that is where it spent all its time! Don't optimize code that does nothing the user cares about."
120msgstr ""
121
122#: C/optimization-intro.xml:98(para)
123msgid "Remember the resources on the X server. Your program's memory usage doesn't include the pixmaps that are stored in the X server's process, but they are still using up memory. Use xrestop to see what resources your program is using."
124msgstr ""
125
126#: C/optimization-intro.xml:104(title)
127msgid "Low Level Hints"
128msgstr ""
129
130#: C/optimization-intro.xml:106(para)
131msgid "When optimizing memory use, be wary of the difference between peak usage and average memory usage. Some memory is almost always allocated, this is usually bad. Some is only briefly allocated, this may be quite acceptable. Tools like massif use the concept of space-time, the product of memory used and the duration it was allocated for, instead."
132msgstr ""
133
134#: C/optimization-intro.xml:111(para)
135msgid "Time simplified bits of code that do only the things you know are essential, this gives an absolute lower limit on the time your code will take. For example, when optimizing a loop time the empty loop. If that is still too long no amount of micro-optimization will help and you will have to change your design. Make sure the compiler doesn't optimize away your empty loop."
136msgstr ""
137
138#: C/optimization-intro.xml:116(para)
139msgid "Move code out from inside loops. A slightly more complicated piece of code that is executed once is far quicker than a simple piece of code executed a thousand times. Avoid calling slow code often."
140msgstr ""
141
142#: C/optimization-intro.xml:121(para)
143msgid "Give the compiler as many hints as possible. Use the const keyword. Use <envar>G_INLINE_FUNC</envar> for short, frequently called, functions. Look up <envar>G_GNUC_PURE</envar>, <envar>G_LIKELY</envar> and the other glib miscellaneous macros. Use the macros instead of gcc-specific keywords to ensure portability."
144msgstr ""
145
146#: C/optimization-intro.xml:126(para)
147msgid "Don't use assembly language. It is not portable and, while it may be fast on one processor, it is not even guaranteed to be fast on every processor that supports that architecture (e.g. Athlon vs. Pentium 4)."
148msgstr ""
149
150#: C/optimization-intro.xml:131(para)
151msgid "Don't rewrite an existing library routine unless you are sure it is unnecessarily slow. Many CPU-intensive library routines have already been optimized. Conversely, some library routines are slow, especially ones that make system calls to the operating system."
152msgstr ""
153
154#: C/optimization-intro.xml:136(para)
155msgid "Minimize the number of libraries you link to. The fewer libraries to link in, the faster the program starts. This is a difficult thing to do with GNOME."
156msgstr ""
157
158#: C/optimization-intro.xml:142(title)
159msgid "High Level Tricks"
160msgstr ""
161
162#: C/optimization-intro.xml:144(para)
163msgid "Take advantage of concurrency. This doesn't just mean using multiple processors, it also means taking advantage of the time the user spends thinking about what they are going to do next to perform some calculations in anticipation. Do calculations while waiting for data to be loaded off disk. Take advantage of multiple resources, use them all at once."
164msgstr ""
165
166#: C/optimization-intro.xml:149(para)
167msgid "Cheat. The user only has to think that the computer is fast, it doesn't matter whether it actually is or not. It is the time between the command and the answer that is important, it doesn't matter if the response is pre-calculated, cached, or will in fact be worked out later at a more convenient time, as long as the user gets what they expect."
168msgstr ""
169
170#: C/optimization-intro.xml:154(para)
171msgid "Do things in the idle loop. It is easier to program than using full multi-threading but still gets things done out of the users eye. Be careful though, if you spend too long in the idle loop your program will become sluggish. So regularly give control back to the main loop."
172msgstr ""
173
174#: C/optimization-intro.xml:159(para)
175msgid "If all else fails, tell the user that the code is going to be slow and put up a progress bar. They won't be as happy as if you had just presented the results, but they will at least know the program hasn't crashed and they can go get a cup of coffee."
176msgstr ""
177
178#. When image changes, this message will be marked fuzzy or untranslated for you.
179#. It doesn't matter what you translate it to: it's not used at all.
180#: C/optimization-massif.xml:52(None)
181msgid "@@image: 'figures/massif-before.png'; md5=1a6b2ace548e6789ab8bfacb3727b345"
182msgstr "@@image: 'figures/massif-before.png'; md5=1a6b2ace548e6789ab8bfacb3727b345"
183
184#. When image changes, this message will be marked fuzzy or untranslated for you.
185#. It doesn't matter what you translate it to: it's not used at all.
186#: C/optimization-massif.xml:114(None)
187msgid "@@image: 'figures/massif-after.png'; md5=36d1b4ad7ab49b28b69ad3eabbaa7069"
188msgstr "@@image: 'figures/massif-after.png'; md5=36d1b4ad7ab49b28b69ad3eabbaa7069"
189
190#: C/optimization-massif.xml:3(title)
191msgid "Using <application>Massif</application> for Profiling Memory Use in GNOME Software"
192msgstr ""
193
194#: C/optimization-massif.xml:5(para)
195msgid "This article describes how to use the <application>Massif</application> heap profiler with GNOME applications. We describe how to invoke, interpret, and act on the output of <application>Massif</application>. The <application>Same GNOME</application> game is used as an example."
196msgstr ""
197
198#: C/optimization-massif.xml:10(title)
199msgid "Introduction"
200msgstr ""
201
202#: C/optimization-massif.xml:11(para)
203msgid "<application>Massif</application> is a member of the <ulink type=\"http\" url=\"http://valgrind.org/\">valgrind</ulink> suite of memory-profiling tools. Its purpose is to give a detailed view of dynamic memory usage during the lifetime of the program. Specifically it records the memory use of the heap and the stack."
204msgstr ""
205
206#: C/optimization-massif.xml:14(para)
207msgid "The heap is the region of memory which is allocated with functions like malloc. It grows on demand and is usually the largest region of memory in a program. The stack is where all the local data for functions is stored. This includes the \"automatic\" variables in C and the return address for subroutines. The stack is typically a lot smaller and a lot more active than the heap. We won't consider the stack explicitly since <application>Massif</application> treats it as though it were just another part of the heap. <application>Massif</application> also gives information about how much memory is used to manage the heap."
208msgstr ""
209
210#: C/optimization-massif.xml:17(para)
211msgid "<application>Massif</application> produces two output files: a graphical overview in a postscript file and a detailed breakdown in a text file."
212msgstr ""
213
214#: C/optimization-massif.xml:22(title)
215msgid "Using <application>Massif</application> with GNOME"
216msgstr ""
217
218#: C/optimization-massif.xml:23(para)
219msgid "<application>Massif</application> has very few options and for many programs does not need them. However for GNOME applications, where memory allocation might be buried deep in either glib or GTK, the number of levels down the call-stack Massif descends needs to be increased. This is achieved using the --depth parameter. By default this is 3; increasing it to 5 will guarantee the call-stack reaches down to your code. One or two more levels may also be desirable to provide your code with some context. Since the level of detail becomes quickly overwhelming it is best to start with the smaller depth parameter and only increase it when it becomes apparent that it isn't sufficient."
220msgstr ""
221
222#: C/optimization-massif.xml:26(para)
223msgid "It is also useful to tell <application>Massif</application> which functions allocate memory in glib. It removes an unnecessary layer of function calls from the reports and gives you a clearer idea of what code is allocating memory. The allocating functions in glib are g_malloc, g_malloc0, g_realloc, g_try_malloc, and g_mem_chunk_alloc. You use the --alloc-fn option to tell Masiff about them."
224msgstr ""
225
226#: C/optimization-massif.xml:29(para)
227msgid "Your command-line should therefore look something like:"
228msgstr ""
229
230#: C/optimization-massif.xml:32(programlisting)
231#, no-wrap
232msgid ""
233"\n"
234"valgrind --tool=massif --depth=5  --alloc-fn=g_malloc --alloc-fn=g_realloc --alloc-fn=g_try_malloc \\\n"
235"         --alloc-fn=g_malloc0 --alloc-fn=g_mem_chunk_alloc same-gnome\n"
236"        "
237msgstr ""
238
239#: C/optimization-massif.xml:36(para)
240msgid "<application>Same GNOME</application> is the program we will be using as an example. Be warned that, since valgrind emulates the CPU, it will run <emphasis>very</emphasis> slowly. You will also need a lot of memory."
241msgstr ""
242
243#: C/optimization-massif.xml:41(title)
244msgid "Interpreting the Results"
245msgstr ""
246
247#: C/optimization-massif.xml:42(para)
248msgid "The graphical output of <application>Massif</application> is largely self explanatory. Each band represents the memory allocated by one function over time. Once you identify which bands are using the most memory, usually the big thick ones at the top you will have to consult the text file for the details."
249msgstr ""
250
251#: C/optimization-massif.xml:45(para)
252msgid "The text file is arranged as a hierarchy of sections, at the top is a list of the worst memory users arranged in order of decreasing spacetime. Below this are further sections, each breaking the results down into finer detail as you proceed down the call-stack. To illustrate this we will use the output of the command above."
253msgstr ""
254
255#: C/optimization-massif.xml:49(title)
256msgid "<application>Massif</application> output for the unoptimized version of the <application>Same GNOME</application> program."
257msgstr ""
258
259#: C/optimization-massif.xml:56(para)
260msgid "<xref linkend=\"optimization-massif-FIG-output-unoptimized\"/> shows a typical postscript output from <application>Massif</application>. This is the result you would get from playing a single game of <application>Same GNOME</application> (version 2.8.0) and then quitting. The postscript file will have a name like <filename>massif.12345.ps</filename> and the text file will be called <filename>massif.12345.txt</filename>. The number in the middle is the process ID of the program that was examined. If you actually try this example you will find two versions of each file, with slightly different numbers, this is because <application>Same GNOME</application> starts a second process and <application>Massif</application> follows that too. We will ignore this second process, it consumes very little memory."
261msgstr ""
262
263#: C/optimization-massif.xml:59(para)
264msgid "At the top of the graph we see a large yellow band labelled gdk_pixbuf_new. This seems like an ideal candidate for optimization, but we will need to use the text file to find out what is calling gdk_pixbuf_new. The top of the text file will look something like this:"
265msgstr ""
266
267#: C/optimization-massif.xml:62(programlisting)
268#, no-wrap
269msgid ""
270"\n"
271"Command: ./same-gnome \n"
272"\n"
273"== 0 ===========================\n"
274"Heap allocation functions accounted for 90.4% of measured spacetime\n"
275"\n"
276"Called from:\n"
277"  28.8% : 0x6BF83A: gdk_pixbuf_new (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
278"\n"
279"    6.1% : 0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
280"\n"
281"    5.9% : 0x510B3C: (within /usr/lib/libfreetype.so.6.3.7)\n"
282"\n"
283"    3.5% : 0x2A4A6B: __gconv_open (in /lib/tls/libc-2.3.3.so)\n"
284"        "
285msgstr ""
286
287#: C/optimization-massif.xml:77(para)
288msgid "The line with the '=' signs indicates how far down the stack trace we are, in this case we are at the top. After this it lists the heaviest users of memory in order of decreasing spacetime. Spacetime is the product of the amount of memory used and how long it was used for. It corresponds to the area of the bands in the graph. This part of the file tells us what we already know: most of the spacetime is dedicated to gdk_pixbuf_new. To find out what called gdk_pixbuf_new we need to search further down the text file:"
289msgstr ""
290
291#: C/optimization-massif.xml:80(programlisting)
292#, no-wrap
293msgid ""
294"\n"
295"== 4 ===========================\n"
296"Context accounted for 28.8% of measured spacetime\n"
297"  0x6BF83A: gdk_pixbuf_new (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
298"  0x3A998998: (within /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so)\n"
299"  0x6C2760: (within /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
300"  0x6C285E: gdk_pixbuf_new_from_file (in /usr/lib/libgdk_pixbuf-2.0.so.0.400.9)\n"
301"\n"
302"Called from:\n"
303"  27.8% : 0x804C1A3: load_scenario (same-gnome.c:463)\n"
304"\n"
305"    0.9% : 0x3E8095E: (within /usr/lib/libgnomeui-2.so.0.792.0)\n"
306"\n"
307"  and 1 other insignificant place\n"
308"        "
309msgstr ""
310
311#: C/optimization-massif.xml:95(para)
312msgid "The first line tells us we are now four levels deep into the stack. Below it is a listing of the function calls that leads from here to gdk_pixbuf_new. Finally there is a list of functions that are at the next level down and call these functions. There are, of course, also entries for levels 1, 2, and 3, but this is the first level to reach right down through the GDK code to the <application>Same GNOME</application> code. From this listing, we can see instantly that the problem code is load_scenario."
313msgstr ""
314
315#: C/optimization-massif.xml:98(para)
316msgid "Now that we know what part of our code is using all the spacetime we can look at it and find out why. It turns out that the load_scenario is loading a pixbuf from file and then never freeing that memory. Having identified the problem code, we can start to fix it."
317msgstr ""
318
319#: C/optimization-massif.xml:103(title)
320msgid "Acting on the Results"
321msgstr ""
322
323#: C/optimization-massif.xml:104(para)
324msgid "Reducing spacetime consumption is good, but there are two ways of reducing it and they are not equal. You can either reduce the amount of memory allocated, or reduce the amount of time it is allocated for. Consider for a moment a model system with only two processes running. Both processes use up almost all the physical RAM and if they overlap at all then the system will swap and everything will slow down. Obviously if we reduce the memory usage of each process by a factor of two then they can peacefully coexist without the need for swapping. If instead we reduce the time the memory is allocated by a factor of two then the two programs can coexist, but only as long as their periods of high memory use don't overlap. So it is better to reduce the amount of memory allocated."
325msgstr ""
326
327#: C/optimization-massif.xml:107(para)
328msgid "Unfortunately, the choice of optimization is also constrained by the needs of the program. The size of the pixbuf data in <application>Same GNOME</application> is determined by the size of the game's graphics and cannot be easily reduced. However, the amount of time it spends loaded into memory can be drastically reduced. <xref linkend=\"optimization-massif-FIG-output-optimized\"/> shows the <application>Massif</application> analysis of <application>Same GNOME</application> after being altered to dispose of the pixbufs once the images have been loaded into the X server."
329msgstr ""
330
331#: C/optimization-massif.xml:111(title)
332msgid "<application>Massif</application> output for the optimized <application>Same GNOME</application> program."
333msgstr ""
334
335#: C/optimization-massif.xml:118(para)
336msgid "The spacetime use of gdk_pixbuf_new is now a thin band that only spikes briefly (it is now the sixteenth band down and shaded magenta). As a bonus, the peak memory use has dropped by 200 kB since the spike occurs before other memory is allocated. If two processes like this where run together the chances of the peak memory usage coinciding, and hence the risk of swapping, would be quite low."
337msgstr ""
338
339#: C/optimization-massif.xml:121(para)
340msgid "Can we do better ? A quick examination of <application>Massif</application>'s text output reveals: g_strdup to be the new major offender."
341msgstr ""
342
343#: C/optimization-massif.xml:124(programlisting)
344#, no-wrap
345msgid ""
346"\n"
347"Command: ./same-gnome \n"
348"\n"
349"== 0 ===========================\n"
350"Heap allocation functions accounted for 87.6% of measured spacetime\n"
351"\n"
352"Called from:\n"
353"    7.7% : 0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
354"\n"
355"    7.6% : 0x43BC9F: (within /usr/lib/libgdk-x11-2.0.so.0.400.9)\n"
356"\n"
357"    6.9% : 0x510B3C: (within /usr/lib/libfreetype.so.6.3.7)\n"
358"\n"
359"    5.2% : 0x2A4A6B: __gconv_open (in /lib/tls/libc-2.3.3.so)\n"
360"        "
361msgstr ""
362
363#: C/optimization-massif.xml:139(para)
364msgid "If we look closer though we see that it is called from many, many, places."
365msgstr ""
366
367#: C/optimization-massif.xml:142(programlisting)
368#, no-wrap
369msgid ""
370"\n"
371"== 1 ===========================\n"
372"Context accounted for  7.7% of measured spacetime\n"
373"  0x5A32A5: g_strdup (in /usr/lib/libglib-2.0.so.0.400.6)\n"
374"\n"
375"Called from:\n"
376"    1.8% : 0x8BF606: gtk_icon_source_copy (in /usr/lib/libgtk-x11-2.0.so.0.400.9)\n"
377"\n"
378"    1.1% : 0x67AF6B: g_param_spec_internal (in /usr/lib/libgobject-2.0.so.0.400.6)\n"
379"\n"
380"    0.9% : 0x91FCFC: (within /usr/lib/libgtk-x11-2.0.so.0.400.9)\n"
381"\n"
382"    0.8% : 0x57EEBF: g_quark_from_string (in /usr/lib/libglib-2.0.so.0.400.6)\n"
383"\n"
384"  and 155 other insignificant places\n"
385"        "
386msgstr ""
387
388#: C/optimization-massif.xml:158(para)
389msgid "We now face diminishing returns for our optimization efforts. The graph hints at another possible approach: Both the \"other\" and \"heap admin\" bands are quite large. This tells us that there are a lot of small allocations are being made from a variety of places. Eliminating these will be difficult, but if they can be grouped then the individual allocations can be larger and the \"heap admin\" overhead can be reduced."
390msgstr ""
391
392#: C/optimization-massif.xml:163(title)
393msgid "Caveats"
394msgstr ""
395
396#: C/optimization-massif.xml:164(para)
397msgid "There are a couple of things to watch out for: Firstly, spacetime is only reported as a percentage, you have to compare it to the overall size of the program to decide if the amount of memory is worth pursuing. The graph, with its kilobyte vertical axis, is good for this."
398msgstr ""
399
400#: C/optimization-massif.xml:167(para)
401msgid "Secondly, <application>Massif</application> only takes into account the memory used by your own program. Resources like pixmaps are stored in the X server and aren't considered by <application>Massif</application>. In the <application>Same GNOME</application> example we have actually only moved the memory consumption from client-side pixbufs to server-side pixmaps. Even though we cheated there are performance gains. Keeping the image data in the X server makes the graphics routines quicker and removes a lot of inter-process communication. Also, the pixmaps will be stored in a native graphics format which is often more compact than the 32-bit RGBA format used by gdk_pixbuf. To measure the effect of pixmaps, and other X resources use the <ulink type=\"http\" url=\"http://www.freedesktop.org/Software/xrestop\">xrestop</ulink> program."
402msgstr ""
403
404#: C/optimization-harmful.xml:3(title)
405msgid "Disk Seeks Considered Harmful"
406msgstr ""
407
408#: C/optimization-harmful.xml:5(para)
409msgid "Disk seeks are one of the most expensive operations you can possibly perform. You might not know this from looking at how many of them we perform, but trust me, they are. Consequently, please refrain from the following suboptimal behavior:"
410msgstr ""
411
412#: C/optimization-harmful.xml:10(para)
413msgid "Placing lots of small files all over the disk."
414msgstr ""
415
416#: C/optimization-harmful.xml:15(para)
417msgid "Opening, stating, and reading lots of files all over the disk"
418msgstr ""
419
420#: C/optimization-harmful.xml:20(para)
421msgid "Doing the above on files that are laid out at different times, so as to ensure that they are fragmented and cause even more seeking."
422msgstr ""
423
424#: C/optimization-harmful.xml:25(para)
425msgid "Doing the above on files that are in different directories, so as to ensure that they are in different cylinder groups and and cause even more seeking."
426msgstr ""
427
428#: C/optimization-harmful.xml:30(para)
429msgid "Repeatedly doing the above when it only needs to be done once."
430msgstr ""
431
432#: C/optimization-harmful.xml:35(para)
433msgid "Ways in which you can optimize your code to be seek-friendly:"
434msgstr ""
435
436#: C/optimization-harmful.xml:40(para)
437msgid "Consolidate data into a single file."
438msgstr ""
439
440#: C/optimization-harmful.xml:45(para)
441msgid "Keep data together in the same directory."
442msgstr ""
443
444#: C/optimization-harmful.xml:50(para)
445msgid "Cache data so as to not need to reread constantly."
446msgstr ""
447
448#: C/optimization-harmful.xml:55(para)
449msgid "Share data so as not to have to reread it from disk when each application loads."
450msgstr ""
451
452#: C/optimization-harmful.xml:60(para)
453msgid "Consider caching all of the data in a single binary file that is properly aligned and can be mmaped."
454msgstr ""
455
456#: C/optimization-harmful.xml:65(para)
457msgid "The trouble with disk seeks are compounded for reads, which is unfortunately what we are doing. Remember, reads are generally synchronous while writes are asynchronous. This only compounds the problem, serializing each read, and contributing to program latency."
458msgstr ""
459
460#: C/optimization-guide.xml:5(title)
461msgid "Optimizing GNOME Software"
462msgstr ""
463
464#: C/optimization-guide.xml:8(publishername)
465#: C/optimization-guide.xml:56(para)
466msgid "GNOME Documentation Project"
467msgstr ""
468
469#: C/optimization-guide.xml:11(year)
470#: C/optimization-guide.xml:15(year)
471msgid "2004-2005"
472msgstr "2004-2005"
473
474#: C/optimization-guide.xml:12(holder)
475msgid "Callum McKenzie"
476msgstr "Callum McKenzie"
477
478#: C/optimization-guide.xml:16(holder)
479msgid "Robert Love"
480msgstr "Robert Love"
481
482#: C/optimization-guide.xml:20(firstname)
483msgid "Callum"
484msgstr "Callum"
485
486#: C/optimization-guide.xml:21(surname)
487msgid "McKenzie"
488msgstr "McKenzie"
489
490#: C/optimization-guide.xml:24(firstname)
491msgid "Robert"
492msgstr "Robert"
493
494#: C/optimization-guide.xml:25(surname)
495msgid "Love"
496msgstr "Love"
497
498#: C/optimization-guide.xml:29(para)
499msgid "Permission is granted to copy, distribute and/or modify this document under the terms of the <citetitle>GNU Free Documentation License</citetitle>, Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the <citetitle>GNU Free Documentation License</citetitle> from the Free Software Foundation by visiting <ulink type=\"http\" url=\"http://www.fsf.org\">their Web site</ulink> or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA."
500msgstr ""
501
502#: C/optimization-guide.xml:41(para)
503msgid "Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and those trademarks are made aware to the members of the GNOME Documentation Project, the names have been printed in caps or initial caps."
504msgstr ""
505
506#: C/optimization-guide.xml:52(revnumber)
507msgid "0.1"
508msgstr "0.1"
509
510#: C/optimization-guide.xml:53(date)
511msgid "November 2007"
512msgstr "November 2007"
513
514#: C/optimization-guide.xml:55(para)
515msgid "William Johnston"
516msgstr "William Johnston"
517
518#: C/optimization-guide.xml:57(para)
519msgid "Intial conversion to docbook format."
520msgstr ""
521
522#: C/optimization-guide.xml:63(para)
523msgid "Software can be optimized in many ways: for speed, program size, or memory use. This section contains guides and tutorials for optimizing your software."
524msgstr ""
525
526#. Put one translator per line, in the form of NAME <EMAIL>, YEAR1, YEAR2
527#: C/optimization-guide.xml:0(None)
528msgid "translator-credits"
529msgstr ""
530
531