-
Notifications
You must be signed in to change notification settings - Fork 73
Replace usage of deprecated rlang::with_handlers()
#1103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 57bbf4e is merged into main:
Further explanation regarding interpretation and methodology can be found in the documentation. |
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 57bbf4e is merged into main:
Further explanation regarding interpretation and methodology can be found in the documentation. |
Hmm, the slowdown is real, but not sure how to avoid it since it's coming from upstream. |
Yes. That’s significant. Let’s report that upstream and see if they want to do something about it. |
Do you want to create an issue upstream? |
Use the suggested replacement instead. Closes #1102
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 92b3d08 is merged into main:
Further explanation regarding interpretation and methodology can be found in the documentation. |
Okay, in light of the benchmark you posted in the other PR, my updated guess is that this slowdown is coming not from rlang but from an update to some other dependency. |
The benchmark in the other PR suggested that moving the checkpoint forward in time did not affect the speed of the execution. Although the {rlang} > 1.0.0 requirement you add in this PR might lead to a different dependency resolution than in #1104. Hence, my suggestion is to require {rlang} > 1.0.0 in a separate PR and see if that has an effect. My benchmark posted in r-lib/rlang actually indicates that the But maybe not for our use case. The benchmark reprex I posted in r-lib/rlang#1612 was very general. So maybe we'll have to refine it. |
Is there some backtrace capture in the error handlers? If you call |
cc: @IndrajeetPatil. Thanks for the info. We'll have to investigate how we call |
This is how benchmark results would change (along with a 95% confidence interval in relative change) if db9bbed is merged into main:
Further explanation regarding interpretation and methodology can be found in the documentation. |
After some digging, I think this is a {touchstone} issue.
benchmark_run(
expr_before_benchmark = {
library(styler)
cache_activate(gert::git_branch())
},
cache_applying = style_pkg("touchstone/sources/here", filetype = c("R", "rmd")),
n = 30
)
callr::r(
function(expr_before_benchmark, dots, branch, block, iteration, asset_dirs) {
withr::local_namespace("touchstone")
withr::local_options(asset_dirs)
eval(expr_before_benchmark)
benchmark <- bench::mark(eval(dots[[1]]), memory = FALSE, iterations = 1)
benchmark_write(benchmark, names(dots), branch = branch, block = block, iteration = iteration)
benchmark
},
args = append(args, lst(iteration)),
libpath = c(libpath_touchstone(branch), .libPaths())
)
cc: @assignUser. |
I tried to run the exact same expression in the console that is ran by {touchstone}. For current bench::mark(
style_pkg("touchstone/sources/here", filetype = c("R", "rmd")),
iterations = 1, memory = FALSE
)
#> Warning message:
#> Some expressions had a GC in every iteration; so filtering is disabled. By default, On the other hand, The new branch |
Use the suggested replacement instead.
Closes #1102