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
Search for duplicates among the existing issues, both open and closed.
Advanced users: verify that the bottleneck still persists in the current development version (i.e. remotes::install_github("ropensci/drake")) and mention the SHA-1 hash of the Git commit you install.
Description
In this Stack Overflow post, I show that there can be a lot of overhead due to proc.time(). (Appears on my work Macbook, but not on my home Linux machine.) Rui Barradas points out that bench::hires_time() is faster. Seems to be >10x faster on Mac OS, Ubuntu 18.04, and RHEL 7. I should probably benchmark it on Windows too.
It is probably not ideal to depend on all of bench, but we can borrow the C code. Then, build_times() and drake_history() need to be compatible with both the new times and the old proc.time() objects.
The text was updated successfully, but these errors were encountered:
On reflection, this approach has some problems. The C code in bench is pretty involved and needs to be tested and maintained on all the major platforms and compilers. Since proc.time() only appears to be a bottleneck on Macs, all that maintenance and testing does not seem worth it. Plus, if we use it, we only get elapsed time. Dropping user and system time would be a breaking change in drake.
What I can do is add a new log_build_times argument to make() and drake_config() that lets users disable the build times. There are a ton of little ways to make make() a lot faster, and they probably deserve a chapter in the manual.
Prework
drake
's code of conduct.remotes::install_github("ropensci/drake")
) and mention the SHA-1 hash of the Git commit you install.Description
In this Stack Overflow post, I show that there can be a lot of overhead due to
proc.time()
. (Appears on my work Macbook, but not on my home Linux machine.) Rui Barradas points out thatbench::hires_time()
is faster. Seems to be >10x faster on Mac OS, Ubuntu 18.04, and RHEL 7. I should probably benchmark it on Windows too.It is probably not ideal to depend on all of
bench
, but we can borrow the C code. Then,build_times()
anddrake_history()
need to be compatible with both the new times and the oldproc.time()
objects.The text was updated successfully, but these errors were encountered: