Re: Performance data for nautilus
- From: Sven Neumann <sven gimp org>
- To: Alexander Larsson <alexl redhat com>
- Cc: Anand Subramanian <anand subra wipro com>, desktop-devel-list gnome org, <gtk-devel-list gnome org>
- Subject: Re: Performance data for nautilus
- Date: 18 Oct 2002 17:59:05 +0200
Hi,
Alexander Larsson <alexl redhat com> writes:
> Very interesting. As usual it shows up GObject at its worst. I fixed a
> leak in nautilus and a couple of places that were excessively typesafe,
> but a lot of this is hard to fix.
>
> I've attached the interesting data for gtype.c. One thing that strikes me
> is:
> * *********************************************************
> * Function: g_type_check_instance_is_a
> * Called: 1106240 times
> * Function time: 121654830 cycles ( 2.25% of .root.)
> * Function+descendants time: 344618647 cycles ( 6.37% of .root.)
> * Distribution to Callers:
> * 203845 times (18.63% of f+d time) g_object_ref
> * 210290 times (19.22% of f+d time) g_object_unref
> * *********************************************************
>
> It seems a full 2.4% of the nautilus execution time is spent making sure
> that what you pass to g_object_ref/unref() is actually GObjects.
> I'm not sure it's really worth that. Maybe we should change G_IS_OBJECT to
> g_type_fundamental (((GTypeInstance *)(instance))->g_class->g_type) ==
> G_TYPE_OBJECT. Or maybe we should just totally dump the typecheck?
shouldn't a production system have glib compiled with
G_DISABLE_CAST_CHECKS anyway? I don't see why we should remove checks
that might help developers if they can be easily disabled at compile
time. Actually I have never understood why the extensive cast checks
aren't disabled by default. Perhaps gtk+ and friends should even be
compiled using G_DISABLE_CHECKS.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]