PATCH: Dependency trimming.
- From: Jason Leach <jasonleach usa net>
- To: gnome-components-list gnome org
- Subject: PATCH: Dependency trimming.
- Date: Sat, 13 Jan 2001 01:56:42 -0500
Hello lovers of faster compiles,
When someone in #gnome asked if bonobo required gnome-libs I decided
to let someone else answer while I snoop around in the bonobo code.
I found #include <gnome.h> in bonobo-main.c and then looked over the
code and saw that it obviously didn't need gnome.h, and took it out.
Thus began a quick survey of some of the other #include <gnome.h>
files and trimming some of the dependency fat off them.
The attached patch takes a little weight off. It doesn't modify
anything except #include lines, and I've compiled from a 'make clean'
and it's added no extra warnings, and obviously the object code isn't
affected.
Here's results of 'wc' on the modified files from bonobo/.deps:
Before:
635 1363 27636 bonobo-main.P
596 1274 26040 bonobo-selector.P
596 1274 26068 bonobo-selector-widget.P
613 1313 26870 bonobo-object-directory.P
592 1266 25850 bonobo-exception.P
727 1571 31676 bonobo-win.P
3759 8061 164140 total
After:
241 545 10142 bonobo-main.P
384 838 16346 bonobo-selector.P
381 837 16366 bonobo-selector-widget.P
202 454 8459 bonobo-object-directory.P
172 386 7098 bonobo-exception.P
551 1211 23576 bonobo-win.P
1931 4271 81987 total
And I wondered whether cutting out 50% [1,800 lines, 82,000 bytes] of
the dependencies from these files was really worth anything, so I did
another little test.
Results of a 'time make' on my 800Mhz 256MB machine:
Before:
real 4m31.457s
user 3m59.120s
sys 0m27.140s
After:
real 4m19.135s
user 3m47.760s
sys 0m26.320s
Ok, not a big deal. But 11 seconds improvement is worth something,
and not everyone has an 800Mhz 256MB machine. Someone will come up
with a reason why the entirety of this patch shouldn't be committed,
so let the objections fly.
Thanks,
Jason.
? depend-trimming.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/bonobo/ChangeLog,v
retrieving revision 1.888
diff -u -r1.888 ChangeLog
--- ChangeLog 2001/01/12 07:19:09 1.888
+++ ChangeLog 2001/01/13 06:52:42
@@ -1,3 +1,18 @@
+2001-01-13 Jason Leach <jasonleach usa net>
+
+ * bonobo/bonobo-exception.c: replaced an #include <gnome.h> with
+ necessary headers to trim dependencies.
+
+ * bonobo/bonobo-object-directory.c: Ditto.
+ * bonobo/bonobo-selector.c: Ditto.
+ * bonobo/bonobo-selector-widget.c: Ditto.
+ * bonobo/bonobo-win.c: Ditto.
+
+ * bonobo/bonobo-main.h: removed unnecessary #include
+ <libgnome/gnome-defs.h>
+
+ * bonobo/bonobo-main.c: removed unnecessary #include <gnome.h>
+
2001-01-12 Miguel de Icaza <miguel ximian com>
* bonobo/bonobo-item-handler.c (bonobo_item_option_parse): Bug fix.
Index: bonobo/bonobo-exception.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-exception.c,v
retrieving revision 1.8
diff -u -r1.8 bonobo-exception.c
--- bonobo/bonobo-exception.c 2000/12/22 12:55:44 1.8
+++ bonobo/bonobo-exception.c 2001/01/13 06:52:42
@@ -8,7 +8,9 @@
*/
#include <config.h>
-#include <gnome.h>
+#include <glib.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
#include <bonobo/bonobo-exception.h>
typedef enum {
Index: bonobo/bonobo-main.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-main.c,v
retrieving revision 1.37
diff -u -r1.37 bonobo-main.c
--- bonobo/bonobo-main.c 2000/12/13 16:28:59 1.37
+++ bonobo/bonobo-main.c 2001/01/13 06:52:42
@@ -17,7 +17,7 @@
#include <bonobo/bonobo-context.h>
#include <signal.h>
-#include <gnome.h>
+#include <gtk/gtkmain.h>
#include <liboaf/liboaf.h>
#include <X11/Xlib.h>
Index: bonobo/bonobo-main.h
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-main.h,v
retrieving revision 1.16
diff -u -r1.16 bonobo-main.h
--- bonobo/bonobo-main.h 2000/10/17 16:58:46 1.16
+++ bonobo/bonobo-main.h 2001/01/13 06:52:42
@@ -13,7 +13,6 @@
#ifndef __GNOME_MAIN_H__
#define __GNOME_MAIN_H__ 1
-#include <libgnome/gnome-defs.h>
#include <gtk/gtkobject.h>
#include <bonobo/Bonobo.h>
Index: bonobo/bonobo-object-directory.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-object-directory.c,v
retrieving revision 1.9
diff -u -r1.9 bonobo-object-directory.c
--- bonobo/bonobo-object-directory.c 2000/12/19 02:37:52 1.9
+++ bonobo/bonobo-object-directory.c 2001/01/13 06:52:42
@@ -13,7 +13,10 @@
*/
#include "config.h"
-#include <gnome.h>
+#include <glib.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
+#include <libgnome/gnome-mime.h>
#include "bonobo-object-directory.h"
#include <liboaf/liboaf.h>
Index: bonobo/bonobo-selector-widget.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-selector-widget.c,v
retrieving revision 1.1
diff -u -r1.1 bonobo-selector-widget.c
--- bonobo/bonobo-selector-widget.c 2000/12/12 23:06:01 1.1
+++ bonobo/bonobo-selector-widget.c 2001/01/13 06:52:42
@@ -17,7 +17,11 @@
*/
#include <config.h>
#include <string.h> /* strcmp */
-#include <gnome.h>
+#include <glib.h>
+#include <libgnome/gnome-defs.h>
+#include <libgnome/gnome-i18n.h>
+#include <libgnomeui/gnome-pixmap.h>
+#include <libgnomeui/gnome-uidefs.h>
#include <bonobo/bonobo-selector-widget.h>
#include <bonobo/bonobo-object-directory.h>
Index: bonobo/bonobo-selector.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-selector.c,v
retrieving revision 1.36
diff -u -r1.36 bonobo-selector.c
--- bonobo/bonobo-selector.c 2000/12/14 19:54:29 1.36
+++ bonobo/bonobo-selector.c 2001/01/13 06:52:42
@@ -17,7 +17,9 @@
*/
#include <config.h>
#include <string.h> /* strcmp */
-#include <gnome.h>
+#include <libgnomeui/gnome-uidefs.h>
+#include <libgnomeui/gnome-stock.h>
+#include <libgnomeui/gnome-dialog.h>
#include <bonobo/bonobo-object-directory.h>
#include <bonobo/bonobo-selector.h>
Index: bonobo/bonobo-win.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-win.c,v
retrieving revision 1.97
diff -u -r1.97 bonobo-win.c
--- bonobo/bonobo-win.c 2001/01/05 17:18:03 1.97
+++ bonobo/bonobo-win.c 2001/01/13 06:52:42
@@ -9,7 +9,9 @@
*/
#include "config.h"
-#include <gnome.h>
+#include <libgnomeui/gnome-dock-item.h>
+#include <libgnomeui/gnome-dock.h>
+#include <libgnomeui/gnome-preferences.h>
#include <bonobo.h>
#include <liboaf/liboaf.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]