Re: Performance data for nautilus
- From: Owen Taylor <otaylor redhat com>
- To: Tim Janik <timj gtk org>
- Cc: Alexander Larsson <alexl redhat com>, Anand Subramanian <anand subra wipro com>, <desktop-devel-list gnome org>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Performance data for nautilus
- Date: Sun, 20 Oct 2002 13:03:38 -0400 (EDT)
Tim Janik <timj gtk org> writes:
> > 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.
>
> boom, segfault. in case instance==NULL, or instance->g_class == NULL. two
> frequent cases intended to be caught by the *_IS_*() macros. so if at all,
> you better make this:
I think worrying about instance->g_class == NULL is a bit silly; I
don't think it's any more likely than instance->g_class being a
junk pointer that would trigger a segfault anyways; preventing
a segfault in the case where instance == NULL is more interesting.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]