From tlumley at u.washington.edu  Mon Apr 25 22:25:20 2005
From: tlumley at u.washington.edu (Thomas Lumley)
Date: Mon Apr 25 22:25:32 2005
Subject: [Rd] Speeding up library loading
In-Reply-To: <426D4CEB.7010802@stats.uwo.ca>
References: <BAY17-F29363AC45E862245EEDB50D1200@phx.gbl>
	<426D4CEB.7010802@stats.uwo.ca>
Message-ID: <Pine.A41.4.61b.0504251314110.36074@homer03.u.washington.edu>

On Mon, 25 Apr 2005, Duncan Murdoch wrote:

> Ali - wrote:
>> 
>>> Is it possible to break the package into multiple parts, perhaps like a 
>>> bundle?  Then you could only load the parts that you need at any 
>>> particular time.
>>> 
>> 
>> It could be done, but the question is, what if one of the packages in the 
>> bundle depends on all of the rest? And the bigger question is, why lazy 
>> loading is not efficient when it comes to many small functions?
>
> Lazy loading just converts an object into a small instruction to load the 
> object. If the object was already small, there's no advantage to that.  It's 
> mainly designed to avoid memory use (some rarely used objects can be 
> gigantic).

>From a design point of view the reason is that this isn't the problem lazy 
loading is trying to solve. We didn't have a problem with packages that 
have huge number of small objects, but we did have a problem with packages 
that had a moderate number of moderately large objects.

In addition, trying to optimize performance is not usually a good idea 
unless you can measure the performance of different implementations on 
real applications, and we didn't have applications like that.


 	-thomas


[Rd] Speeding up library loading
Thomas Lumley