Skip to content
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

Vectorise str_replace_all() #2416

Merged
merged 2 commits into from
Oct 4, 2022
Merged

Vectorise str_replace_all() #2416

merged 2 commits into from
Oct 4, 2022

Conversation

hadley
Copy link
Member

@hadley hadley commented Oct 4, 2022

In the development version of stringr, I'm exploring vectorising the function form of str_replace_all() (tidyverse/stringr#462) because it offers considerable performance improvements. This patch quickly hacks rmarkdown to work with this change. It would probably be worthwhile to vectorise the two users of process_html_res() as that is likely to give a small, but meaningful, performance boost when there are many matches.

This patch will work with both CRAN and dev stringr.

In the development version of stringr, I'm exploring vectorising the function form of `str_replace_all()` (https://github.com/tidyverse/stringr/pull/4620) because it offers considerable performance improvements. This patch quickly hacks rmarkdown to work with this change. It would probably be worthwhile to vectorise the two users of `process_html_res()` as that is likely to give a small, but meaningful, performance boost when there are many matches.
@cderv
Copy link
Collaborator

cderv commented Oct 4, 2022

Thank you.

Last release of rmarkdown was in August so we could probably release a new version very soon if you need that for stringr new release. @yihui would that work ?

When do you schedule the new stringr release ?

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can do a CRAN release this week.

R/base64.R Outdated Show resolved Hide resolved
[ci skip]
@hadley
Copy link
Member Author

hadley commented Oct 4, 2022

That would be great, but there's no need to rush on my behalf as this is I'm unlikely to start the stringr release process for at least two weeks.

@yihui yihui merged commit f764a66 into main Oct 4, 2022
@yihui yihui deleted the vectorise-str_replace_all branch October 4, 2022 14:55
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Nov 7, 2022
Merge remote-tracking branch 'rstudio/main' into jg-tree-fix

# By Yihui Xie (5) and others
# Via Yihui Xie
* rstudio/main:
  refactor the code a little bit
  allow custom output format to define its own Markdown converting function, so that we could use other tools (not necessarily Pandoc)
  rewrap lines
  Add render() output_file argument repetition (rstudio#2422)
  start the next version
  CRAN release v2.17
  Vectorise str_replace_all() (rstudio#2416)
  Correctly load glyphicons in dropdown tabset
  add vscode lua config to gitignore
  Search also in `index.rmd` for `site:` key in YAML header (rstudio#2413)

# Conflicts:
#	NEWS.md
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Nov 7, 2022
* jg-devel:
  refactor the code a little bit
  allow custom output format to define its own Markdown converting function, so that we could use other tools (not necessarily Pandoc)
  rewrap lines
  Add render() output_file argument repetition (rstudio#2422)
  start the next version
  CRAN release v2.17
  Vectorise str_replace_all() (rstudio#2416)
  Correctly load glyphicons in dropdown tabset
  add vscode lua config to gitignore
  Search also in `index.rmd` for `site:` key in YAML header (rstudio#2413)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants