After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 334041 - Properties page creation slows nautilus down
Properties page creation slows nautilus down
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Properties page
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-03-09 16:29 UTC by Bastien Nocera
Modified: 2006-03-14 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
totem-init-backend-later.patch (1.32 KB, patch)
2006-03-09 16:33 UTC, Bastien Nocera
none Details | Review

Description Bastien Nocera 2006-03-09 16:29:29 UTC
"libtotem-properties-page.so, a Nautilus extension, 0.3 seconds. It initializes GStreamer on startup (!). Can it delay the initialization of GStreamer until Nautilus makes the first real call into any of the extension's methods?"

Yep, we're calling gst_init() in nautilus_module_initialize().

Bleh, let's init it when we create the first page instead...
Comment 1 Bastien Nocera 2006-03-09 16:33:37 UTC
Created attachment 60986 [details] [review]
totem-init-backend-later.patch

That should work. Any takers for testing?
Comment 2 Christoph Burghardt 2006-03-09 18:34:00 UTC
Works for me (TM)
Comment 3 Ed Catmur 2006-03-09 18:48:07 UTC
Works great (Gentoo, totem-2.13.92 from gnome-experimental).
Comment 4 Jose M. daLuz 2006-03-09 21:27:13 UTC
Works fine here as well. Gentoo AMD64, totem-2.13.92 (from Break My Gentoo).
Comment 5 Bastien Nocera 2006-03-11 11:14:50 UTC
2006-03-11  Bastien Nocera  <hadess@hadess.net>

        * src/totem-properties-main.c: (totem_properties_get_pages),
        (nautilus_module_initialize): only initialise the backend when we
        create the first page, making nautilus startup slightly faster with
        the GStreamer backend (Closes: #334041)
Comment 6 Diego González 2006-03-11 12:10:01 UTC
i haven't have the chance to try this patch, however i think it is moving the problem from one place to another, as the first time that you click on the properties of a multimedia file the dialog will take a "long" time to be shown.

How about initializing gstreamer in an idle loop or something like that?
Comment 7 Federico Mena Quintero 2006-03-14 13:49:55 UTC
Thanks for the patch, Bastien!  I'm taking a new timing run.

(In reply to comment #6)
> i haven't have the chance to try this patch, however i think it is moving the
> problem from one place to another, as the first time that you click on the
> properties of a multimedia file the dialog will take a "long" time to be shown.
> 
> How about initializing gstreamer in an idle loop or something like that?

... the we would be eating time in the idle loop.  You have to do the initialization *somewhere*, after all :)

In any case, first let's see if it is a problem to initialize gstreamer when the property page is brought up.