Closed Bug 563628 Opened 14 years ago Closed 9 years ago

fold libdbusservice into libxul

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ted, Unassigned)

References

Details

Currently we build libdbusservice, libmozgnome and libnkgnomevfs all as separate binary components. This means we have to load three extra shared libraries during startup. They're implemented this way so that they can link to their respective libraries, such as libdbus, and on systems without that library the component will simply fail to load and so the component is not used. We could achieve the same effect by dlopen()ing the necessary libraries and failing if they're not present. bug 402742 did that for the gnome icon code, and I was able to fold that into libxul in bug 553635.
dlopen() bothers me, because it hides dependencies, on top of complicating the code. All that for a few ms of startup time that could probably be gained by delaying the initialization of these components...
We already use dlopen() for the other gnome components. How would you propose we delay-init these components, when we don't know what the component is without opening it to ask it? Loading extra shared libs is always going to cost us in startup time.
Why not have a separate components directory for delayed initialization ? Or, if all components that matter are already statically linked, the normal components directory could just be initialized later.
So you'd rather add a whole level of complexity to the XPCOM component loader than a little bit of dlopen/dlsym complexity to the individual components?
(In reply to comment #4)
> So you'd rather add a whole level of complexity to the XPCOM component loader
> than a little bit of dlopen/dlsym complexity to the individual components?

That level of complexity could also benefit to javascript components.
If this bug is going to be reworking the libmozgnome component, would it be possible to also address Bug 547800? It'd be really nice to have GConf/GIO support without also requiring libgnome/libgnomeui/gnome-vfs (all of which are deprecated)
Fixing this in the way I described would probably fix that as well, since we'd have to dynamically load all the dependent libraries anyway.
Depends on: 713827
Depends on: 821291
mozgnome no longer needs to check for run-time dependencies (bug 821291).

Similarly, libdbusservice has no more dependencies than libxul.

So both of these can merged into libxul unconditionally.

libnkgnomevfs no longer exists.
Depends on: 1047752
Summary: fold libdbusservice, libmozgnome, libnkgnomevfs into libxul → fold libdbusservice into libxul
I wonder whether libdbusservice (and NetworkManager?) support has been removed.
I don't see it now.
It was removed in bug 1179568
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.