Re: [Rd] Slow try in combination with do.call

2021-10-12 Thread Martin Maechler
Just in case, you hadn't noticed: Since Sep.17, we have had the faster try() now in both R-devel and "R 4.1.1 patched" which will be released as R 4.1.2 by the end of this month, with NEWS entry • try() is considerably faster in case of an error and long call, as e.g., from some do.c

Re: [Rd] Slow try in combination with do.call

2021-10-12 Thread nos...@altfeld-im.de
In fact an attentive user reported the same type of (slow due to deparse) problem in may tryCatchLog package recently when using a large sparse matrix https://github.com/aryoda/tryCatchLog/issues/68 and I have fixed it by explicitly using the nlines arg of deparse() instead of using as.char

Re: [Rd] Slow try in combination with do.call

2021-09-16 Thread Martin Maechler
> Martin Maechler > on Thu, 16 Sep 2021 17:48:41 +0200 writes: > Alexander Kaever > on Thu, 16 Sep 2021 14:00:03 + writes: >> Hi, >> It seems like a try(do.call(f, args)) can be very slow on error depending on the args size. This is related to a complete dep

Re: [Rd] Slow try in combination with do.call

2021-09-16 Thread Martin Maechler
> Alexander Kaever > on Thu, 16 Sep 2021 14:00:03 + writes: > Hi, > It seems like a try(do.call(f, args)) can be very slow on error depending on the args size. This is related to a complete deparse of the call using deparse(call)[1L] within the try function. How about re

[Rd] Slow try in combination with do.call

2021-09-16 Thread Alexander Kaever
Hi, It seems like a try(do.call(f, args)) can be very slow on error depending on the args size. This is related to a complete deparse of the call using deparse(call)[1L] within the try function. How about replacing deparse(call)[1L] by deparse(call, nlines = 1)? Best, Alex Example: fun <- f