You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdelibs/tdeinit
Michele Calgaro 04d3532360
Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version
1 year ago
..
tests Additional k => tde renaming and fixes 11 years ago
CMakeLists.txt Use private linking for exported CMake targets. 5 years ago
LICENSE.setproctitle Rename remnant files and references from kinit -> tdeinit. 12 years ago
Mainpage.dox Removed code formatting modelines. 4 years ago
Makefile.am LIB_QT -> LIB_TQT conversion to align to updated admin module 6 years ago
README qt -> tqt conversion: 6 years ago
README.DCOP Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version 1 year ago
README.autostart Rename remnant files and references from kinit -> tdeinit. 12 years ago
README.wrapper Rename remnant files and references from kinit -> tdeinit. 12 years ago
autostart.cpp Rename remnant files and references from kinit -> tdeinit. 12 years ago
autostart.h Rename remnant files and references from kinit -> tdeinit. 12 years ago
configure.in.in Rename remnant files and references from kinit -> tdeinit. 12 years ago
kwrapper.c Rename remnant files and references from kinit -> tdeinit. 12 years ago
lnusertemp.c tdeinit: make lnusertemp respect HOME for root 8 years ago
setproctitle.cpp Removed explicit usage of the 'register' keyword. 5 years ago
setproctitle.h Rename remnant files and references from kinit -> tdeinit. 12 years ago
shell.c Rename remnant files and references from kinit -> tdeinit. 12 years ago
start_tdeinit.c Added missing headers for tdeinit/start_tdeinit.c 5 years ago
start_tdeinit_wrapper.c Rename remnant files and references from kinit -> tdeinit. 12 years ago
tdedostartupconfig.cpp QT_NO_* -> TQT_NO_* renaming. 6 years ago
tdeinit.cpp Process the new location of the ICEauthority file 5 years ago
tdeioslave.cpp Additional k => tde renaming and fixes 11 years ago
tdelauncher.cpp Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version 1 year ago
tdelauncher.h Replace Q_OBJECT with TQ_OBJECT 1 year ago
tdelauncher_cmds.h Additional k => tde renaming and fixes 11 years ago
tdelauncher_main.cpp Rename remnant files and references from kinit -> tdeinit. 12 years ago
tdestartupconfig.cpp Rename remnant files and references from kinit -> tdeinit. 12 years ago
wrapper.c Rename remnant files and references from kinit -> tdeinit. 12 years ago

README

README

tdeinit is a process launcher somewhat similar to the 
famous init used for booting UNIX.

It launches processes by forking and then loading a
dynamic library which should contain a 'main(...)'
function. 

Executive summary
=================

Using tdeinit to launch KDE applications makes starting
a typical KDE applications 2.5 times faster (100ms 
instead of 250ms on a P-III 500) It reduces memory 
consumption by approx. 350Kb per application.


How it works
============

tdeinit is linked against all libraries a standard KDE
application needs. With this technique starting an
application becomes much faster because now only
the application itself needs to be linked whereas 
otherwise both the application as well as all the libaries
it uses need to be linked.

Startup Speed
=============

Starting an application linked against libtqt, libtdecore and libtdeui
in the conventional way takes approx. 150ms on a Pentium III - 500Mhz. 
Starting the same application via tdeinit takes less than 10ms.

(application without TDEApplication constructor, the TDEApplication 
constructor requires an extra 100ms in both cases)

Memory Usage
============

An application linked against libtqt, libtdecore and libtdeui started
in the conventional way requires about 498Kb memory. 
(average of 10 instances) If the same application is started via
tdeinit it requires about 142Kb. A difference of 356Kb (application 
without TDEApplication constructor) 

If we take the TDEApplication constructor into account, an application
started in the conventional way takes about 679Kb memory while the same
application started via tdeinit requires about 380Kb. Here the difference
is somewhat less, 299Kb. This seems to be caused by the fact that the
dynamic linker does "lazy linking". We can force the linker to link
everything at startup by specifying "LD_BIND_NOW=true". When tdeinit is
started with this option on, tdeinit is back to its full efficiency, an
application with a TDEApplication constructor now uses 338Kb of memory.
A difference of 341Kb with the normal case.

Adapting programs to use tdeinit.
===============================

The sourcecode of a program does not require any change to take advantage
of tdeinit. Only the makefile requires an adaption, if the Makefile.am of 
a normal program looks like this:

bin_PROGRAMS = kicker   
kicker_LDADD = $(top_builddir)/libkonq/libkonq.la
kicker_LDFLAGS = $(all_libraries) $(KDE_RPATH)

The following lines need to be added to make a library version useable 
by tdeinit:

lib_LTLIBRARIES = kicker.la
libkicker_la_LIBADD = $(top_builddir)/libkonq/libkonq.la
libkicker_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -module                    

Disadvantages
=============

The process name of applications started via tdeinit is "tdeinit". This problem
can be corrected to a degree by changing the application name as shown
by 'ps'. However, applications like "killall" will only see "tdeinit" as 
process name. To workaround this, use "tdekillall", from tdesdk/scripts,
for applications started via tdeinit.