Re: [Rd] Speeding up library loading

2005-04-26 Thread Duncan Murdoch
Ali - wrote: Assume 100 C++ classes each class having 100 member functions. After wrapping these classes into R, if the wrapping design is class-oriented we should have like 100 objects. At the same time, if the wrapping design is function-oriented we have like 10`000 objects which are too laz

Re: [Rd] Speeding up library loading

2005-04-25 Thread Ali -
Assume 100 C++ classes each class having 100 member functions. After wrapping these classes into R, if the wrapping design is class-oriented we should have like 100 objects. At the same time, if the wrapping design is function-oriented we have like 10`000 objects which are too lazy for lazy lo

Re: [Rd] Speeding up library loading

2005-04-25 Thread Duncan Murdoch
Ali - wrote: 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 thi

Re: [Rd] Speeding up library loading

2005-04-25 Thread Ali -
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 pr

Re: [Rd] Speeding up library loading

2005-04-25 Thread Thomas Lumley
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 dep

Re: [Rd] Speeding up library loading

2005-04-25 Thread Duncan Murdoch
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 que

Re: [Rd] Speeding up library loading

2005-04-25 Thread Roger D. Peng
I think the reason, as Uwe already said, is that you have to load the lazyload index file, and in your case that file is likely to be as large as the R file itself. -roger Ali - wrote: Is it possible to break the package into multiple parts, perhaps like a bundle? Then you could only load the

Re: [Rd] Speeding up library loading

2005-04-25 Thread Ali -
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

Re: [Rd] Speeding up library loading

2005-04-25 Thread Roger D. Peng
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. -roger Ali - wrote: 4Mb R file just containing .Call()s? Never seen something like that. If these are all very small functions, lazy load won

Re: [Rd] Speeding up library loading

2005-04-25 Thread Ali -
4Mb R file just containing .Call()s? Never seen something like that. If these are all very small functions, lazy load won't be of that advantage, because you have to load the index file anyway. You know, R including all base and recommended packages has just ~ 6Mb of R code. Are you really sure

Re: [Rd] Speeding up library loading

2005-04-25 Thread Uwe Ligges
Ali - wrote: UweL> Ali - wrote: >> (1) When R tries to load a library, does it load 'everything' in the >> library at once? UweL> No, see ?lazyLoad are you sure Ali is talking about *package*s. He did use the word "library" though, and most of us (including Uwe!) know the differe

Re: [Rd] Speeding up library loading

2005-04-25 Thread Ali -
UweL> Ali - wrote: >> (1) When R tries to load a library, does it load 'everything' in the >> library at once? UweL> No, see ?lazyLoad are you sure Ali is talking about *package*s. He did use the word "library" though, and most of us (including Uwe!) know the difference... >>

Re: [Rd] Speeding up library loading

2005-04-25 Thread Martin Maechler
> "UweL" == Uwe Ligges <[EMAIL PROTECTED]> > on Mon, 25 Apr 2005 18:51:50 +0200 writes: UweL> Ali - wrote: >> (1) When R tries to load a library, does it load 'everything' in the >> library at once? UweL> No, see ?lazyLoad are you sure Ali is talking about *package*s

Re: [Rd] Speeding up library loading

2005-04-25 Thread Uwe Ligges
Ali - wrote: (1) When R tries to load a library, does it load 'everything' in the library at once? No, see ?lazyLoad (2) Is there any options to 'load as you go'? Well, this is the way R does it Uwe Ligges __ R-devel@stat.math.ethz.ch mailing list h

[Rd] Speeding up library loading

2005-04-25 Thread Ali -
(1) When R tries to load a library, does it load 'everything' in the library at once? (2) Is there any options to 'load as you go'? __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel