Skip to content

Speed up backport_linter()#2348

Merged
AshesITR merged 9 commits into
mainfrom
fix/backports-performance
Nov 27, 2023
Merged

Speed up backport_linter()#2348
AshesITR merged 9 commits into
mainfrom
fix/backports-performance

Conversation

@AshesITR

Copy link
Copy Markdown
Collaborator

A slight speedup by using a more efficient data structure for backport checking.

devtools::load_all()
system.time(lint_package(linters = backport_linter("oldrel-4", except = c("R_user_dir", "str2lang", "str2expression", "deparse1", "...names"))))

# here
#    user  system elapsed 
#  5.667   0.011   5.675 

# main
#    user  system elapsed 
#  6.270   0.020   6.286 

@codecov-commenter

codecov-commenter commented Nov 23, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (828bb9c) 99.41% compared to head (a5096a3) 99.41%.

❗ Current head a5096a3 differs from pull request most recent head d731089. Consider uploading reports for the commit d731089 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2348   +/-   ##
=======================================
  Coverage   99.41%   99.41%           
=======================================
  Files         124      124           
  Lines        5654     5655    +1     
=======================================
+ Hits         5621     5622    +1     
  Misses         33       33           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AshesITR

Copy link
Copy Markdown
Collaborator Author

I'll do some more testing to see if I find an even better solution, but avoiding do.call(rbind, ...) saves almost 20%.

@AshesITR AshesITR linked an issue Nov 23, 2023 that may be closed by this pull request
Comment thread R/backport_linter.R Outdated
Comment thread NEWS.md Outdated
@AshesITR AshesITR merged commit cba4fa6 into main Nov 27, 2023
@AshesITR AshesITR deleted the fix/backports-performance branch November 27, 2023 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants