quarto-dev / quarto-dev/quarto-cli
metadata-files is slow downing the single file render if there is a R file with yaml header format
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
quarto render a single file is slow with extra calling Rscript.exe under these conditions
- _quarto.yml file has
metadata-filesattribute - a R file with yaml header
it will take very long time to render a single file if there are many R scripts with yaml header in the project (40 s vs 3 s).
Steps to reproduce
- Check out the repository with a minimum reproduceable example: https://github.com/byzheng/quarto-metadata-files-test
- Call
quarto render .\index.qmd --log-level debugto render index.qmd file - Notice call
Rscript.exethree times in the console output
[execProcess] C:\Users\<username>\AppData\Local\Programs\R\R-4.5\bin\Rscript.exe C:\Users\<username>\AppData\Local\Programs\Quarto\share\rmd\rmd.R
[execProcess] Success: true, code: 0
[execProcess] C:\Users\<username>\AppData\Local\Programs\R\R-4.5\bin\Rscript.exe C:\Users\<username>\AppData\Local\Programs\Quarto\share\rmd\rmd.R
[execProcess] Success: true, code: 0
[execProcess] C:\Users\<username>\AppData\Local\Programs\R\R-4.5\bin\Rscript.exe C:\Users\<username>\AppData\Local\Programs\Quarto\share\rmd\rmd.R
[execProcess] Success: true, code: 0
- rename
utils.Rtoqmdextension or merge_website.ymlinto_quarto.yml. The same call to renderindex.qmdwill not see the extra calling ofRscript.exe.
Actual behavior
See details from this minimum example: https://github.com/byzheng/quarto-metadata-files-test
Expected behavior
No extra calling of Rscript.exe rmd.R if
- _quarto.yml file has
metadata-filesattribute - a R file with yaml header
Your environment
- VS code
- Windows 11
- Quarto version: 1.8.27 and 1.9.35
Quarto check output
Quarto 1.8.27
[>] Checking environment information...
Quarto cache location: C:\Users\<username>\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.3.1: OK
Typst version 0.13.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.8.27
Path: C:\Users\<username>\AppData\Local\Programs\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[>] Checking LaTeX....................OK
Tex: (not detected)
[>] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: C:\Program Files\Google\Chrome\Application\chrome.exe
Source: Windows Registry
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.13.12
Path: C:/Users/<username>/AppData/Local/Microsoft/WindowsApps/PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0/python.exe
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with py -m pip install jupyter
[>] Checking R installation...........OK
Version: 4.5.2
Path: C:/Users/<username>/AppData/Local/Programs/R/R-4.5
LibPaths:
- C:/Users/<username>/AppData/Local/Programs/R/R-4.5/library
knitr: 1.51
rmarkdown: 2.30
[>] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked minimum reproducible repository and run quarto render .\index.qmd --log-level debug, comparing the extra Rscript.exe rmd.R calls when metadata-files references R files with YAML headers. Trace the metadata-files and single-file render path; done means rendering the same file no longer makes the redundant R calls while preserving the expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100