Re: [R-pkg-devel] What influences the size of the rdb file in a package

2021-10-30 Thread Duncan Murdoch
On 30/10/2021 11:12 a.m., Bill Dunlap wrote: The byte code attached to each function in a package can be surprisingly large.  E.g., the byte code for the c. 300 line function Matrix:::replTmat seems to be c. 4.5 times the size of the raw code: > object.size(Matrix:::replTmat) / object.size(a

Re: [R-pkg-devel] What influences the size of the rdb file in a package

2021-10-30 Thread Bill Dunlap
The byte code attached to each function in a package can be surprisingly large. E.g., the byte code for the c. 300 line function Matrix:::replTmat seems to be c. 4.5 times the size of the raw code: > object.size(Matrix:::replTmat) / object.size(as.function(as.list(Matrix:::replTmat))) 5.5 bytes

Re: [R-pkg-devel] What influences the size of the rdb file in a package

2021-10-30 Thread Duncan Murdoch
On 30/10/2021 3:00 a.m., Mosqueira Sanchez, Iago wrote: As far as I can see only classes, methods and functions are present there. I loaded the rdb file and looked at the contents and sizes of objects. Am I right in assuming every method or function imported from another package sits in the data

Re: [R-pkg-devel] What influences the size of the rdb file in a package

2021-10-30 Thread Mosqueira Sanchez, Iago
As far as I can see only classes, methods and functions are present there. I loaded the rdb file and looked at the contents and sizes of objects. Am I right in assuming every method or function imported from another package sits in the database? In another S4 package I see that the largest objects

Re: [R-pkg-devel] What influences the size of the rdb file in a package

2021-10-29 Thread Duncan Murdoch
On 29/10/2021 4:23 p.m., Gábor Csárdi wrote: You probably (accidentally?) put some large object into your package, e.g. a non-function object. But it is hard to say more without seeing the actual code Yes. To track it down, you need to understand that an INSTALL executes everything in the

Re: [R-pkg-devel] What influences the size of the rdb file in a package

2021-10-29 Thread Gábor Csárdi
You probably (accidentally?) put some large object into your package, e.g. a non-function object. But it is hard to say more without seeing the actual code Gabor On Fri, Oct 29, 2021 at 10:07 PM Mosqueira Sanchez, Iago wrote: > > > I am getting warnings in some packages about the size of the

[R-pkg-devel] What influences the size of the rdb file in a package

2021-10-29 Thread Mosqueira Sanchez, Iago
I am getting warnings in some packages about the size of the R folder * checking installed package size ... NOTE installed size is 20.5Mb sub-directories of 1Mb or more: data 2.4Mb R 17.8Mb This package contains around 3300 lines of code, if the results of grep -v '^\s*#' *.R