Re: [Rd] Big speedup in install.packages() by re-using connections

2024-09-09 Thread Jeroen Ooms
On Mon, Sep 9, 2024 at 11:11 AM Tomas Kalibera wrote: > > > On 9/8/24 23:14, Jeroen Ooms wrote: > > On Mon, Sep 2, 2024 at 10:05 AM Tomas Kalibera > > wrote: > >> > >> On 4/25/24 17:01, Ivan Krylov via R-devel wrote: > >>> On Thu, 25 Apr 2024 14:45:04 +0200 > >>> Jeroen Ooms wrote: > >>> >

Re: [Rd] Big speedup in install.packages() by re-using connections

2024-09-09 Thread Tomas Kalibera
On 9/8/24 23:14, Jeroen Ooms wrote: On Mon, Sep 2, 2024 at 10:05 AM Tomas Kalibera wrote: On 4/25/24 17:01, Ivan Krylov via R-devel wrote: On Thu, 25 Apr 2024 14:45:04 +0200 Jeroen Ooms wrote: Thoughts? How verboten would it be to create an empty external pointer object, add it to the p

Re: [Rd] Big speedup in install.packages() by re-using connections

2024-09-08 Thread Jeroen Ooms
On Mon, Sep 2, 2024 at 10:05 AM Tomas Kalibera wrote: > > > On 4/25/24 17:01, Ivan Krylov via R-devel wrote: > > On Thu, 25 Apr 2024 14:45:04 +0200 > > Jeroen Ooms wrote: > > > >> Thoughts? > > How verboten would it be to create an empty external pointer object, > > add it to the preserved list,

Re: [Rd] Big speedup in install.packages() by re-using connections

2024-09-02 Thread Tomas Kalibera
On 4/25/24 17:01, Ivan Krylov via R-devel wrote: On Thu, 25 Apr 2024 14:45:04 +0200 Jeroen Ooms wrote: Thoughts? How verboten would it be to create an empty external pointer object, add it to the preserved list, and set an on-exit finalizer to clean up the curl multi-handle? As far as I can

Re: [Rd] Big speedup in install.packages() by re-using connections

2024-04-25 Thread Ivan Krylov via R-devel
On Thu, 25 Apr 2024 14:45:04 +0200 Jeroen Ooms wrote: > Thoughts? How verboten would it be to create an empty external pointer object, add it to the preserved list, and set an on-exit finalizer to clean up the curl multi-handle? As far as I can tell, the internet module is not supposed to be unl

Re: [Rd] Big speedup in install.packages() by re-using connections

2024-04-25 Thread Jeroen Ooms
I'd like to raise this again now that 4.4 is out. Below is a more complete patch which includes a function to properly cleanup libcurl when R quits. Implementing this is a little tricky because libcurl is a separate "module" in R, perhaps there is a better way, but this works: view: https://git

[Rd] Big speedup in install.packages() by re-using connections

2024-03-02 Thread Jeroen Ooms
Currently download.file() creates and terminates a new TLS connection for each download. This creates a lot of overhead which is expensive for both client and server (in particular the TLS handshake). Modern internet clients (including browsers) re-use connections for many http requests. We can do