Hello,

> >> Can you be specific about where the time is being spent? Loading libraries
> >> can be expensive no matter what. Is it possible that the delay is just more
> >> noticable to you because rather than taking the hit at startup (the dynamic
> >> loader links the libraries before calling main()) the load happens during
> >> execution of your program where it's more apparent?
>
> > I'm using a low power ppc cpu and it spends 6seconds in
> > XPCOMGlueStartup. With FF2 libs , my web page comes up in 13s, with
> > xulrunner-1.9 my web page comes up in 22s.
>
> Did your startup time change?
>
> That is, did loading gecko always cost 9 seconds, but we've moved it to a
> different place, or is this a completely new 9 second delay?

This is a completely new 9 seconds delay.

> > Reading this page
> >http://developer.mozilla.org/en/XPCOM_Glue
> > I would have think that there was a way to start my browser quicker
> > without having to call XPCOMGlueStartup/GTKEmbedGlueStartup. It was
> > what I understood according to the following text:
> > "Embedding code which wishes to use only frozen symbols and cannot
> > tolerate a load-time dependency on xpcom.dll should #define XPCOM_GLUE
> > 1 while compiling, and link against xpcomglue.lib. It should not link
> > against xpcomglue_s.lib or xpcom.lib."
>
> Your understanding is incorrect. We *always* have to load XPCOM. The
> difference is how we load it:
>
> Dependent glue: you link directly against libxpcom.so (this is called a
> load-time dependency). The dynamic linker does the loading for you at
> startup time. Functions are called directly.
>
> Embedding glue: you don't link directly against libxpcom.so. Instead, you
> programmatically load libxpcom.so and populate the functions you want to use
> as function pointers (using XPCOMGlueStartup and GTKEmbedGlueStartup).

I solved the sigsegv problem I get using dependent glue. It was not
related to xulrunner. So here's the point I've reached:

When I use embedding glue, a small local html file comes up in 22s, 7
seconds is spent in XPCOMGlueStartup.
When I use Dependent glue, the same local html file comes up in 15s
seconds. I do not call XPCOMGlueStartup.

> You're probably going to need to generate some profiles of the time spent in
> XPCOMGlueStartup. Providing more details about your setup would also help,
> for instance:
>
> * What OS?

Linux on ppc hardware, based on Denx 4.1 ( fedora 3-7 rpms based),
glibc 2.3.5, kernel 2.6.25

> * What library model (ELF, Mach-O, etc)

ELF

> * What compiler, and what version? Does that compiler support
> hidden-visibility pragmas correctly?

I have to use gcc 4.0, so I remove hidden-visibility pragmas.

> Proper support for ELF hidden-visibility pragmas was fixed in GCC 4.2...
> using and older version of GCC will definitely cause increased startup time
> because the dynamic linker will have to perform thousands of relocations
> when you load the gecko libraries.

I think you're indeed ;-) Would the use of gcc 4.2 improve start-up
time in a significant way ? both in dependent and embedding glue ?

Thanks for your time.

      Patrice

_______________________________________________
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to