Difference between revisions of "Performance/Reorder Symbols For Libraries"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Solaris)
(Reorder code/data for libraries to improve file I/O)
Line 1: Line 1:
 
= Reorder code/data for libraries to improve file I/O =
 
= Reorder code/data for libraries to improve file I/O =
  
The [http://wiki.services.openoffice.org/wiki/Performance/OOo31_LibrariesOnStartup#Cold_startup_Writer_.28without_AV_real-time_protection.29 comprehensive analysis] of the cold start up behavior of OpenOffice.org shows that file I/O is main bottleneck. About 80% of the start up time is spent waiting for data from the disk. Most file I/O depends on library loading. This part describes what can be done to reduce I/O time for loading OpenOffice.org libraries. The main ideas are system independent but the solutions must be system/compiler specific. The following chapters describe in detail how we want to reorder code/data within the libraries.
+
The [http://wiki.services.openoffice.org/wiki/Performance/OOo31_LibrariesOnStartup#Cold_startup_Writer_.28without_AV_real-time_protection.29 comprehensive analysis] of the cold start up behavior of OpenOffice.org shows that file I/O is the main bottleneck. About 80% of the start up time is spent waiting for data from the disk. Most file I/O depends on library loading. This part describes what can be done to reduce I/O time for loading OpenOffice.org libraries. The main ideas are system independent but the solutions must be system/compiler specific. The following chapters describe in detail how we want to reorder code/data within the libraries.
  
== Windows ==
+
== Main idea ==
 +
 
 +
 
 +
== System dependent solution ==
 +
 
 +
=== Windows ===
  
 
This chapter describes the solution for the Windows platform.
 
This chapter describes the solution for the Windows platform.
  
=== Microsoft Visual Studio 2008 ===
+
==== Microsoft Visual Studio 2008 ====
  
 
OpenOffice.org uses the Microsoft Visual Studio 2008 C/C++ compiler suite for the Windows build, called wntmsci12[.pro]. What options are available to support us reordering code/data in libraries? If you start the C/C++ compiler and linker with the help option you can see all supported options. The following section shows the options which can help us.
 
OpenOffice.org uses the Microsoft Visual Studio 2008 C/C++ compiler suite for the Windows build, called wntmsci12[.pro]. What options are available to support us reordering code/data in libraries? If you start the C/C++ compiler and linker with the help option you can see all supported options. The following section shows the options which can help us.
Line 33: Line 38:
 
</source>
 
</source>
  
=== Determine what functions are called during start up ===
+
===== Determine what functions are called during start up =====
  
=== How to create an ORDER file that is accepted by the linker ===
+
===== How to create an ORDER file that is accepted by the linker =====
  
== Linux ==
+
=== Linux ===
  
== MacOS X ==
+
=== MacOS X ===
  
 
The following [http://developer.apple.com/documentation/Performance/Conceptual/CodeFootprint/Articles/ImprovingLocality.html web page] from Apple describes what must be done to reorder code/data of a library to improvde locality.
 
The following [http://developer.apple.com/documentation/Performance/Conceptual/CodeFootprint/Articles/ImprovingLocality.html web page] from Apple describes what must be done to reorder code/data of a library to improvde locality.
  
== Solaris ==
+
=== Solaris ===
  
 
OpenOffice.org uses the Sun Studio C++ compiler suite for building on both Sparc and x86 CPU systems. The following [http://developers.sun.com/solaris/articles/codelayout.html web page] describes what can be done to optimize the code layout of libraries with the Sun Studio C++ compiler suite.
 
OpenOffice.org uses the Sun Studio C++ compiler suite for building on both Sparc and x86 CPU systems. The following [http://developers.sun.com/solaris/articles/codelayout.html web page] describes what can be done to optimize the code layout of libraries with the Sun Studio C++ compiler suite.

Revision as of 19:39, 22 March 2009

Reorder code/data for libraries to improve file I/O

The comprehensive analysis of the cold start up behavior of OpenOffice.org shows that file I/O is the main bottleneck. About 80% of the start up time is spent waiting for data from the disk. Most file I/O depends on library loading. This part describes what can be done to reduce I/O time for loading OpenOffice.org libraries. The main ideas are system independent but the solutions must be system/compiler specific. The following chapters describe in detail how we want to reorder code/data within the libraries.

Main idea

System dependent solution

Windows

This chapter describes the solution for the Windows platform.

Microsoft Visual Studio 2008

OpenOffice.org uses the Microsoft Visual Studio 2008 C/C++ compiler suite for the Windows build, called wntmsci12[.pro]. What options are available to support us reordering code/data in libraries? If you start the C/C++ compiler and linker with the help option you can see all supported options. The following section shows the options which can help us.

Microsoft (R) 32-Bit C/C++-Optimizing Compiler Version 15.00.30729.01 for 80x86
 
Copyright (C) Microsoft Corporation.  All rights reserved.
 
...
/Gh Enable _penter Hook Function
/GH Enable _pexit Hook Function
/Gy Enable Function-Level Linking
...
 
Microsoft (R) Incremental Linker Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.
 
 Syntax: LINK [Options] [Files] [@Commandfile]
 
   Options:
      ...
      /ORDER:@Filename
      ...
Determine what functions are called during start up
How to create an ORDER file that is accepted by the linker

Linux

MacOS X

The following web page from Apple describes what must be done to reorder code/data of a library to improvde locality.

Solaris

OpenOffice.org uses the Sun Studio C++ compiler suite for building on both Sparc and x86 CPU systems. The following web page describes what can be done to optimize the code layout of libraries with the Sun Studio C++ compiler suite.

Personal tools