Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Qt Extended Single Exec

Introduction

By default Qt Extended compiles dynamically. This allows applications to be installed but increases the minimum size and startup time. If installable applications are not required Qt Extended can be built as single-exec. This uses static linking to put everything into a single multi-call binary (similar to how busybox works).

Costs/Benefits

The costs of using single-exec are:

  • Cannot install new applications except by rebuilding Qt Extended.
  • The single-exec binary is too large put on a cramfs filesystem.

The benefits of using single-exec are:

  • The single-exec binary is smaller than the combined sizes of the dynamic binaries.
  • The memory footprint is reduced due to the static linking.
  • All dynamic linking costs are removed due to the static linking. This can speed up Qt Extended startup time, app startup time and plugin load time.
  • SXE is disabled which can lead to a performance gain in situations involving lots of messaging.

How it works

Libraries are compiled statically. Plugins are compiled as static libraries. Applications are compiled as static libraries. Static global initializers are used to register the plugins with the plugin manager. They are also used to register the quicklaunch applications with quicklauncher and the non-quicklaunch applications with the server. See Applications for information about how applications can be launched.

All of these static libraries are linked into the server creating a single binary. When the server starts it looks at argv[0] to determine which process it is.

The size benefit of single-exec is derived from static linking. When the linker combines the code, it performs various size optimizations such as:

  • removing inline functions that are always included inline
  • removing redundant or dead code that is not used by any applications
  • not including symbol tables usually needed for dynamic linking
  • no requirement for the code to be position independent code (PIC) which provides additional size and speed advantages.

Issues

One important thing to be aware of when building single-exec with additional 3rd-party components is that the symbols must not clash with those from other applications. The use of C++ namespaces would be a very good idea to avoid potential problems caused by this.

Building Single-exec

To build Qt Extended as a single-exec binary simply pass -singleexec to configure.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web