1
<chapter id="performance-0">
2
<title>Improving Performance</title>
4
<para>This chapter describes how to improve the performance of
5
the GNOME Desktop.</para>
7
<sect1 id="performance-1">
8
<title>Introduction to Improving Performance</title>
10
<primary>performance, improving</primary>
11
<secondary>introduction</secondary>
13
<para>This chapter lists several preferences whose
14
settings you can change to improve the performance of the GNOME Desktop. You
15
can use the <command>gconftool-2</command> command to set values for preferences
16
for users. The example commands in this chapter show how to set values in
17
the user configuration source.</para>
18
<para>You can also use the <literal>--direct</literal> and <literal>--config-source</literal> options to set mandatory values or default values for preferences.
19
You can also use the <command>gconftool-2</command> command in a script to
20
set the values of many preferences. For more information on the <command>gconftool-2</command> command and the options that are available with the
21
command, see <xref linkend="gconf-0"/>.</para>
23
<sect1 id="performance-8">
24
<title>Reducing CPU Usage</title>
26
<primary>performance, improving</primary>
27
<secondary>reducing CPU
31
<primary>reducing</primary>
32
<secondary>CPU usage</secondary>
35
<primary>CPU usage</primary>
36
<secondary>reducing</secondary>
38
<para>This section describes preferences that
39
you can set to reduce CPU usage by the GNOME Desktop. </para>
40
<sect2 id="performance-3">
41
<title>To Use Theme Options Which Require Less CPU Resources</title>
43
<primary>themes</primary>
44
<secondary>window frame options</secondary>
45
<tertiary>and CPU usage</tertiary>
48
<primary>themes</primary>
49
<secondary>and CPU usage</secondary>
51
<para>Some window frame theme
52
options load image files to draw the window frame. Other options use simpler
53
techniques to draw the window frame.</para>
54
<para>The Crux window frame option loads image files, and can be slow on systems
55
with limited CPU resources. To reduce CPU usage, use one of the following
56
window frame options: </para>
65
<para>The following window frame options also use less CPU resources than
69
<para>AgingGorilla</para>
79
<para>Metabox does not work well with inverse controls options such
80
as HighContrastInverse. Use Atlanta with inverse controls options.</para>
82
<para><indexterm><primary>themes</primary><secondary>window frame options</secondary><tertiary>changing</tertiary></indexterm>To change the window
83
frame theme option, run the following command: </para>
84
<screen><userinput>gconftool-2 \
86
--set /apps/metacity/general/theme <replaceable>option-name</replaceable></userinput></screen>
87
<para>For example, to use Atlanta, run the following command:</para>
88
<screen><userinput>gconftool-2 \
90
--set /apps/metacity/general/theme Atlanta</userinput></screen>
91
<para>Alternatively, users can use the <application>Theme</application> preference
92
tool to select the appropriate option.</para>
94
<para>You can use the <application>Metacity Theme Viewer</application>
95
to measure the performance of a window frame option, and to preview the option.
96
To start <application>Metacity Theme Viewer</application>, use the following
98
<screen><userinput>metacity-theme-viewer <replaceable>option-name</replaceable></userinput></screen>
99
<para>For example, to measure the performance of Atlanta and preview Atlanta,
100
run the following command: </para>
101
<screen><userinput>metacity-theme-viewer Atlanta</userinput></screen>
104
<sect2 id="performance-2">
105
<title>To Reduce CPU Usage by Turning Off Display of Icons in Menus</title>
107
<primary>icons, in menus</primary>
108
<see>menu icons</see>
111
<primary>menu icons</primary>
112
<secondary>and CPU usage</secondary>
115
<primary>menu icons</primary>
116
<secondary>turning off</secondary>
118
<para>Some items in menus display an icon beside the
119
item. To turn off this feature, run the following command: </para>
120
<screen><userinput>gconftool-2 \
122
--set /desktop/gnome/interface/menus_have_icons false</userinput></screen>
123
<para>Alternatively, users can use the <application>Menus & Toolbars</application>
124
preference tool to deselect the <guilabel>Show icons in menus</guilabel> option.</para>
126
<sect2 id="performance-6">
127
<title>To Reduce CPU Usage by Turning Off the Splash Screen</title>
129
<primary>splash screen</primary>
130
<secondary>and CPU usage</secondary>
132
<para>By default, when users log in to the desktop environment,
133
a splash screen is displayed. Icons are displayed on the splash screen while
134
the user logs in. You can turn off the splash screen to reduce CPU usage during
136
<para><indexterm><primary>splash screen</primary><secondary>turning off</secondary></indexterm>To turn off the splash screen, run the following command:</para>
137
<screen><userinput>gconftool-2 \
139
--set /apps/gnome-session/options/show_splash_screen false</userinput></screen>
140
<para>Alternatively, users can use the <application>Sessions</application>
141
preference tool to deselect the <guilabel>Show splash screen on login</guilabel>
144
<sect2 id="performance-4">
145
<title>To Reduce CPU Usage by Turning Off Panel Animation</title>
147
<primary>panels</primary>
148
<secondary>animation, turning off</secondary>
150
<para>When users show or hide panels, the panels can show or hide
151
in an animated style. To turn off panel animation, run the following command: </para>
152
<screen><userinput>gconftool-2 \
154
--set /apps/panel/global/enable_animations false</userinput></screen>
155
<para>Alternatively, users can use the <application>Panel</application> preference
156
tool to deselect the <guilabel>Drawer and panel animation</guilabel> option.</para>
158
<sect2 id="performance-7">
159
<title>Improving File Manager Performance</title>
161
<primary>Nautilus</primary>
162
<see>file manager</see>
164
<para>The <application>Nautilus</application> file manager includes some features
165
that you can modify to improve performance.</para>
166
<sect3 id="performance-9">
167
<title>To Modify Performance Preferences</title>
169
<primary>file manager</primary>
170
<secondary>modifying performance
171
preferences</secondary>
173
<para>The file manager includes performance-related
174
preferences. Each performance preference can take one of three values. The
175
values are described in the following table:</para>
176
<informaltable frame="topbot">
177
<tgroup cols="2" colsep="0" rowsep="0">
178
<colspec colwidth="34.46*"/>
179
<colspec colwidth="65.54*"/>
186
<para>Description</para>
194
<literal>always</literal>
198
<para>Performs the action for both local files, and files on
199
other file systems.</para>
205
<literal>local_only</literal>
209
<para>Performs the action for local files only. When you
210
set a performance preference to <literal>local_only</literal>, the CPU usage
217
<literal>never</literal>
221
<para>Never performs the action. When you set a performance preference
222
to never, the CPU usage and the network traffic are reduced.</para>
228
<para>The following table describes the performance preferences for the file
229
manager. For the fastest performance, set the value of the preferences to <literal>never</literal>.</para>
230
<informaltable frame="topbot">
231
<tgroup cols="2" colsep="0" rowsep="0">
232
<colspec colwidth="43.34*"/>
233
<colspec colwidth="56.66*"/>
237
<para>Preference</para>
240
<para>Description</para>
248
<literal>show_icon_text</literal>
252
<para>Specifies when to preview the content of text files
253
in the icon that represents the file. To never preview the content of text
254
files, run the following command: </para>
255
<screen><userinput>gconftool-2 \
257
--set /apps/nautilus/preferences/show_icon_text never</userinput></screen>
258
<para>Alternatively, users can perform
259
the following steps:</para>
262
<para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Preferences</guimenuitem></menuchoice> from a file manager window, then choose <guilabel>Preview</guilabel>.</para>
265
<para>Select an option for the <guilabel>Show text in icons</guilabel>
274
<literal>show_directory_item_counts</literal>
278
<para>Specifies when to show the number of items in folders.
279
To never show the number of items in folders, run the following command:</para>
280
<screen><userinput>gconftool-2 \
282
--set /apps/nautilus/preferences/show_directory_item_counts never</userinput></screen>
283
<para>Alternatively, users can perform the following steps:</para>
286
<para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Preferences</guimenuitem></menuchoice> from a file manager window, then choose <guilabel>Preview</guilabel>.</para>
289
<para>Select an option for the <guilabel>Count number of items</guilabel>
298
<literal>show_image_thumbnails</literal>
302
<para>Specifies when to show thumbnails of image files.
303
To never show thumbnails, run the following command:</para>
304
<screen><userinput>gconftool-2 \
306
--set /apps/nautilus/preferences/show_image_thumbnails never</userinput></screen>
307
<para>Alternatively, users can perform the following steps:</para>
310
<para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Preferences</guimenuitem></menuchoice> from a file manager window, then choose <guilabel>Preview</guilabel>.</para>
313
<para>Select an option for the <guilabel>Show thumbnails</guilabel>
322
<literal>preview_sound</literal>
326
<para>Specifies when to preview the content of sound files.
327
To never preview the content of sound files, run the following command:</para>
328
<screen><userinput>gconftool-2 \
330
--set /apps/nautilus/preferences/preview_sound never</userinput></screen>
331
<para>Alternatively, users can perform the following
335
<para>Choose <menuchoice><guimenu>Edit</guimenu><guimenuitem>Preferences</guimenuitem></menuchoice> from a file manager window, then choose <guilabel>Preview</guilabel>.</para>
338
<para>Select an option for the <guilabel>Preview sound files</guilabel>
348
<sect3 id="performance-10">
349
<title>To Turn Off the Side Pane, Toolbar, and Location Bar</title>
351
<primary>file manager</primary>
352
<secondary>side pane, turning off</secondary>
354
<para>The file manager includes preferences that enable
355
you to turn off the side pane and the toolbar. To improve file manager performance,
356
turn off the side pane and the toolbar.</para>
357
<para>To turn off the side pane, run the following command: </para>
358
<screen><userinput>gconftool-2 \
360
--set /apps/nautilus/preferences/start_with_sidebar false</userinput></screen>
361
<para><indexterm><primary>file manager</primary><secondary>toolbar, turning
362
off</secondary></indexterm>To turn off the toolbar, run the following command: </para>
363
<screen><userinput>gconftool-2 \
365
--set /apps/nautilus/preferences/start_with_toolbar false</userinput></screen>
366
<para>You can also turn off the location bar. Users can use the <keycombo><keycap>Ctrl</keycap><keycap>L</keycap></keycombo> keyboard shortcut to display a location bar
367
when required. </para>
368
<para><indexterm><primary>file manager</primary><secondary>location bar, turning
369
off</secondary></indexterm>To turn off the location bar, run the following
371
<screen><userinput>gconftool-2 \
373
--set /apps/nautilus/preferences/start_with_location_bar false</userinput></screen>
375
<sect3 id="performance-11">
376
<title>To Turn Off the Desktop</title>
378
<primary>file manager</primary>
379
<secondary>desktop, turning off</secondary>
382
<primary>desktop</primary>
386
<para>The file manager contains a preference that
387
enables users to use <application>Nautilus</application> to manage the desktop.
388
You can disable the desktop to improve performance. However, if you disable
389
the desktop, you cannot do the following:</para>
392
<para>Use the <guimenu>Desktop</guimenu> menu.</para>
395
<para>Use the file manager to change the pattern or color of the
396
desktop background. </para>
399
<para>Use the desktop objects, such as <guilabel>Trash</guilabel>.
400
The desktop objects are not displayed on the desktop. </para>
403
<para>To disable the desktop, run the following command: </para>
404
<screen><userinput>gconftool-2 \
406
--set /apps/nautilus/preferences/show_desktop false</userinput></screen>
410
<sect1 id="performance-12">
411
<title>Reducing X Window System Network Traffic</title>
413
<primary>reducing</primary>
414
<secondary>X Window System network traffic</secondary>
417
<primary>X Window System network traffic,
421
<primary>network traffic, reducing</primary>
423
<para>This section describes preferences that you can
424
set to reduce X Window System network traffic on the GNOME Desktop. </para>
425
<sect2 id="performance-14">
426
<title>To Use Theme Options Which Create Less Network Traffic</title>
428
<primary>themes</primary>
429
<secondary>window frame options</secondary>
430
<tertiary>and network traffic</tertiary>
433
<primary>themes</primary>
434
<secondary>and network traffic</secondary>
437
display protocols do not transfer every pixel in a block of pixels if all
438
pixels in the block are the same color.</para>
439
<para>To reduce X Window System network traffic, use a window frame theme
440
option that uses solid colors. That is, use one of the following window frame
450
<para>For information on how to change theme options, see <xref linkend="performance-3"/>.</para>
452
<sect2 id="performance-15">
453
<title>To Reduce Network Traffic by Turning Off Display of Icons in Menus</title>
455
<primary>menu icons</primary>
456
<secondary>and network traffic</secondary>
458
<para>Some items in menus display an icon beside the item. If
459
the icon is located on another file system, this feature can increase X Window
460
System network traffic. This feature can also increase X Window System network
461
traffic if the panels are displayed on a remote host. </para>
462
<para>For information on how to turn off this feature, see <xref linkend="performance-2"/>.</para>
465
<sect1 id="performance-17">
466
<title>Reducing Color Usage and Improving Display Quality</title>
468
<primary>reducing</primary>
469
<secondary>color usage</secondary>
472
<primary>color usage</primary>
473
<secondary>reducing</secondary>
476
<primary>display quality, improving</primary>
478
<para>Many modern computer systems support 24-bit color, that is, 16,777,216 colors.
479
However, many users still use systems that support 8-bit color, that is, 256
481
<para>The GNOME Desktop uses the <firstterm>websafe color palette</firstterm>.
482
This palette is a general-purpose palette of 216 colors, which is designed
483
to optimize the use of color on systems that support 8-bit color. However,
484
some visual components of the GNOME Desktop are designed for systems that
485
support 24-bit color.</para>
486
<para>The following display problems might occur on systems that support 8-bit
490
<para>Windows, icons, and background images might appear grainy.
491
Many themes, background images, and icons use colors that are not in the
492
websafe color palette. The colors that are not in the palette are replaced
493
with the nearest equivalent or a dithered approximation. This use of replacement
494
colors causes the grainy appearance.</para>
497
<para>Applications that do not use the websafe color palette have
498
less colors available. Color errors might occur. Some colors might not appear
499
in the user interface of the application. Some applications might crash if
500
the application cannot allocate colors.</para>
503
<para>Color flashing might occur when users switch between applications
504
that use the websafe color palette, and applications that do not use this
505
palette. The applications that do not use the websafe color palette might
506
use a custom colormap. When the custom colormap is used, other visual components
507
might lose colors, then become unviewable.</para>
510
<para>The following sections describe how to optimize the appearance of the
511
GNOME Desktop for systems that support 8-bit color. </para>
512
<sect2 id="performance-20">
513
<title>To Use Theme Options That Use the Websafe Color Palette</title>
515
<primary>themes</primary>
516
<secondary>window frame options</secondary>
517
<tertiary>and color usage</tertiary>
520
<primary>themes</primary>
521
<secondary>and color usage</secondary>
524
frame theme options use colors that are in the websafe color palette. Bright
525
and Esco use colors from the websafe color palette. Bright and Esco do not
526
have the grainy appearance of other window frame options on 8-bit color displays.
527
Use Bright or Esco for the best color display on 8-bit visual modes. </para>
528
<para>For information on how to change theme options, see <xref linkend="performance-3"/>.</para>
530
<sect2 id="performance-21">
531
<title>To Reduce Color Usage by Turning Off Display of Icons in Menus</title>
533
<primary>menu icons</primary>
534
<secondary>and color usage</secondary>
536
<para>Some items in menus display an icon beside the item. If
537
the icon contains colors that are not in the websafe color palette, this feature
538
can increase the number of colors used.</para>
539
<para>For information on how to turn off this feature, see <xref linkend="performance-2"/>.</para>
541
<sect2 id="performance-18">
542
<title>To Reduce Color Usage by Turning Off the Splash Screen</title>
544
<primary>splash screen</primary>
545
<secondary>and color usage</secondary>
547
<para>You can turn off the splash screen to make more colors available
548
for the GNOME Desktop and for applications.</para>
549
<para>For information on how to turn off the splash screen, see <xref linkend="performance-6"/>.</para>
551
<sect2 id="performance-19">
552
<title>To Reduce Color Usage by Using a Solid Color for the Background</title>
554
<primary>background</primary>
555
<secondary>using solid color</secondary>
557
<para>Use a solid color for the desktop background. Use of a solid
558
color reduces the number of colors used by the GNOME Desktop. </para>
559
<para>To set a solid color for the background, run the following commands: </para>
560
<screen><userinput>gconftool-2 \
562
--set /desktop/gnome/background/picture_options none</userinput></screen>
563
<screen><userinput>gconftool-2 \
565
--set /desktop/gnome/background/color_shading_type solid</userinput></screen>
566
<screen><userinput>gconftool-2 \
568
--set /desktop/gnome/background/primary_color #<replaceable>hexadecimal-color</replaceable></userinput></screen>
569
<para>Alternatively, users can use the <application>Background</application>
570
preference tool to choose a solid color for the background.</para>