Home · All Classes · Grouped Classes · Annotated · Functions

Enablers: Application Execution
Functional Description


Daemon and non-UI Applications (QTOPIA-41)

Some Qtopia 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 Qtopia'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 Qtopia application terminates (or enters the lazy application shutdown state pending termination) whenever its UI is hidden, but Qtopia does provide special support for daemon and hybrid applications.

A Qtopia 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.

Qtopia provides no inbuilt support for daemon applications that are NOT Qtopia 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 Qtopia.

Lazy Application Shutdown (QTOPIA-40)

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.

Quicklauncher (QTOPIA-39)

Much of a Qtopia 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 Qtopia 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 © 2008 Nokia Trademarks
Qtopia 4.3.3