Subject: Re: why ld.elf_so is slow starting mozilla
To: David Laight <firstname.lastname@example.org>
From: Charles M. Hannum <email@example.com>
Date: 10/02/2002 20:43:55
> I added some more tracing to ld.elf_so and have finally realised
> why things like mozilla startup are quite so slow.
Actually, the reason Mozilla starts up slowly has little to do with
ld.elf_so. I traced it myself, and the reality is that Mozilla itself
spends >80% of its startup time parsing its .xpt files. Optimization
that speeds up that operation would have by far the biggest impact.
That said, your `realisation' is not new. It is in fact the origin of
the `mark' code, which I had to remove to fix other problems that it
Part of the problem is actually the ubiquitous use of weak symbols.
E.g., you can see at the very beginning of the trace that the search
for dlsym() goes through the entire set of DAGs, even though it's
defined in crt0 -- because it's defined as a weak symbol. It would be
helpful if we had a way to do symbol aliasing and/or self-binding
(c.f. libc's namespace.h) without resorting to weak symbols and the
inherent performance loss they cause.