You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During package development I notices some errors were very slow to print. I used the test code below (slowness seems to relate to the number of records in i). As you see the example below with reprex is actually fast but if i call the code in Rstudio it takes 38 seconds in R 4.1.2 and 8 seconds in R 4.3.1 (I update R to see if that was the cause, rstudio version 2023.03.1). If I call R from the terminal it takes 2 seconds (independent of R version), this still seems a bit slow. As speed seems to scale with the size of i it seems to apply an operation to all elements of I while for these long vectors that would not be needed as only a limited number of elements are visualized. Maybe other can test if the code is also slow(ish) for them?
It takes about 8s for i=1:1000 in RStudio 2023.06.1 but is instantaneous in RGui or in reprex::reprex(). Running it inside callr::r() in RStudio yields 0.5s elapsed but takes 6.5s to run so this is probably happening during the printing/formatting for RStudio.
For a vector of length n, the time increases very linearly with n.
During package development I notices some errors were very slow to print. I used the test code below (slowness seems to relate to the number of records in
i
). As you see the example below withreprex
is actually fast but if i call the code in Rstudio it takes 38 seconds in R 4.1.2 and 8 seconds in R 4.3.1 (I update R to see if that was the cause, rstudio version 2023.03.1). If I call R from the terminal it takes 2 seconds (independent of R version), this still seems a bit slow. As speed seems to scale with the size ofi
it seems to apply an operation to all elements of I while for these long vectors that would not be needed as only a limited number of elements are visualized. Maybe other can test if the code is also slow(ish) for them?Created on 2023-07-07 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: