Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

Enablers: Application Execution
Functional Description

Features

Daemon and non-UI Applications

Some Qt Extended applications, such as the VoIP application "sipagent" and the mediaserver, act as daemons. These applications provide services or functionality to the system, but do not have a UI. Other applications, such as Qt Extended's synchronization agent qdsync have a UI but also provide an important service to the system that requires them to keep running in the background even when the UI is not shown. Normally a Qt Extended application terminates (or enters the lazy application shutdown state pending termination) whenever its UI is hidden, but Qt Extended does provide special support for daemon and hybrid applications.

A Qt Extended Application - that is, one with a QtopiaApplication instance - will continue running while either it is showing its UI or it has any uncompleted "tasks" registered with the system. Tasks are registered via a method call on QtopiaApplication. This mechanism allows complex applications to control their lifecycle.

Qt Extended provides no inbuilt support for daemon applications that are NOT Qt Extended Applications (again, have a QtopiaApplication instance). Most such applications either have a dedicated owner that manages their lifecycle (eg. pppd) or are largely independent of and generally started before Qt Extended.

Lazy Application Shutdown

It is common for a user to be rapidly switching between a small number of applications. While from their perspective they are starting, using and then exiting an application, starting an application, even with quicklauncher, is expensive and so it is inefficient for the system to truly act in this manner. With "lazy application shutdown" enabled (Trolltech/Launcher:AppLoading/LazyShutdown=true) rather than terminating an application when the user exits from it the system leaves it running in a hidden state. When the user restarts the application the running process only has to perform the comparatively quick operation of showing its UI.

The system will automatically terminate applications in the lazy application shutdown state when either too many are in this state or the system gets low on memory. Lazy Application Shutdown is a performance optimization and does not effect the way applications appear to the user.

Preloaded Applications

Qt Extended provides a UI to preload applications which start immediately after Qt Extended starts, but in a hidden state. This ensures almost instantaneouse "startup" for applications which are frequently used.

Quicklauncher

Much of a Qt Extended application's startup time is spent in the slow but necessary tasks of C++ symbol relocation and QtopiaApplication/QApplication construction. Doing this predictable, repetitive work at the last moment gives poor application launch performance.

To avoid this, at startup the Qt Extended server launches the quicklauncher stub application. While the user is still idling, this process is busy starting up, and performing all the common application initialization work. By the time the user gets around to launching an application, the quicklauncher process is idling in the background. Rather than running a new process from scratch the quicklauncher loads the requested application, as a shared library, into its address space and starts executing application specific code with no delay.

The quicklauncher process is restarted once used, with a small delay to avoid poor performance of the foreground application. On typical devices, if the user starts two applications within 5-7 seconds, no quicklauncher process will exist for the second, and so the second application starts up slower.


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3