This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: lazy library loading
On 02/19/2013 04:33 AM, Andrew Senkevich wrote:
>> So the next question I have is: What problem are you trying to solve?
>>
>> One of the most expensive operation is symbol binding and that is
>> already deferred by lazy symbol resolution.
>>
>> Why do you need lazy library loading?
>
> I am trying to solve problem of start-up time of applications having a
> lot of unused libraries during first window initialization.
Sounds like a good problem to try solving.
>> Have you experimented with this and do you have any relative
>> performance numbers?
>
> Yes, on several measured applications, lazy library loading can save
> from 2% up to 22% of start-up time, depending on application.
> Of course not exact numbers, calculated with some assumptions..
Those look like good numbers.
I encourage you to start looking at the code in rtld/*, which is where
the bulk of the dynamic loader code lives.
Start experimenting and post your questions or results to
libc-alpha@sourceware.org so other senior developers can review it.
Cheers,
Carlos.