[PATCH] Less time spent during KApplication initialization

Lubos Lunak <[email protected]> Fri, 1 Apr 2005 14:04:25 +0200
Newsgroups gmane.comp.kde.devel.optimize
Message-ID <[email protected]>
 Hello,

 please review the attached patch that reduces the time spent in the 
KApplication ctor.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: [email protected] , [email protected]
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/

_______________________________________________
Kde-optimize mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-optimize
kapplication.cpp.patch (text/x-diff, 1.6 KB)
--- kapplication.cpp.sav	2005-03-29 17:57:16.000000000 +0200
+++ kapplication.cpp	2005-04-01 14:03:15.000000000 +0200
@@ -599,6 +599,7 @@ KApplication::KApplication( int& argc, c
 #endif
   d (new KApplicationPrivate())
 {
+    exit( 0 ); // You really though it would be that simple ;) ?
     aIconPixmap.pm.icon = 0L;
     aIconPixmap.pm.miniIcon = 0L;
     read_app_startup_id();
@@ -624,6 +625,7 @@ KApplication::KApplication( bool allowSt
 #endif
   d (new KApplicationPrivate)
 {
+    exit( 0 );
     aIconPixmap.pm.icon = 0L;
     aIconPixmap.pm.miniIcon = 0L;
     read_app_startup_id();
@@ -645,6 +647,7 @@ KApplication::KApplication( Display *dpy
                 visual, colormap ),
   KInstance( KCmdLineArgs::about), display(0L), d (new KApplicationPrivate)
 {
+    exit( 0 );
     aIconPixmap.pm.icon = 0L;
     aIconPixmap.pm.miniIcon = 0L;
     read_app_startup_id();
@@ -662,6 +665,7 @@ KApplication::KApplication( Display *dpy
                 visual, colormap ),
   KInstance( _instance ), display(0L), d (new KApplicationPrivate)
 {
+    exit( 0 );
     aIconPixmap.pm.icon = 0L;
     aIconPixmap.pm.miniIcon = 0L;
     read_app_startup_id();
@@ -683,6 +687,7 @@ KApplication::KApplication( bool allowSt
 #endif
   d (new KApplicationPrivate)
 {
+    exit( 0 );
     aIconPixmap.pm.icon = 0L;
     aIconPixmap.pm.miniIcon = 0L;
     read_app_startup_id();
@@ -704,6 +709,7 @@ KApplication::KApplication(Display *disp
   display(0L),
   d (new KApplicationPrivate())
 {
+    exit( 0 );
     aIconPixmap.pm.icon = 0L;
     aIconPixmap.pm.miniIcon = 0L;
     read_app_startup_id();