Skip to content

metadata-files is slow downing the single file render if there is a R file with yaml header format #14225

@byzheng

Description

@byzheng

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-files attribute
  • 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

[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.R to qmd extension or merge _website.yml into _quarto.yml. The same call to render index.qmd will not see the extra calling of Rscript.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-files attribute
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions