tidymodels / spatialsample

Create and summarize spatial resampling objects 🗺
https://spatialsample.tidymodels.org
Other
71 stars 5 forks source link

Only call st_distance once #65

Closed mikemahoney218 closed 2 years ago

mikemahoney218 commented 2 years ago

This PR makes buffering a bit faster (hopefully! I'm going to compare CI run times as my arbiter here, since "faster on my machine" isn't useful) by only calling st_distance() once rather than many calls to sf::st_is_within_distance().

mikemahoney218 commented 2 years ago

Here's the times to beat (for testthat itself to run, no other part of R CMD check or the CI process):

https://github.com/tidymodels/spatialsample/actions/runs/2491350933

macOS-latest (release): 721/546 (1267) windows-latest (release): 530 ubuntu-18.04 (devel): 39m/24m (63m) ubuntu-18.04 (release): 38m/24m (62m)

mikemahoney218 commented 2 years ago

And the results are in...

https://github.com/tidymodels/spatialsample/actions/runs/2495377211

macOS-latest (release): 354/262 (616) windows-latest (release): 178 ubuntu-18.04 (devel): 732s/417s (20m) ubuntu-18.04 (release): 909s/516s (23m)

:open_mouth:

github-actions[bot] commented 2 years ago

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.