### Bug description

`quarto render xyz.qmd` will throw  `Fatal javascript OOM in Reached heap limit` when a certain number of figures are added (in our case plotly graphs). In our case it was 26 figures and we get OOM.

```
<--- Last few GCs --->

[2027:0x55bc3354a960]    66765 ms: Mark-sweep 1591.0 (1625.9) -> 1587.9 (1622.4) MB, 7.6 / 0.0 ms  (average mu = 0.989, current mu = 0.989) allocation failure; scavenge might not succeed


<--- JS stacktrace --->


#
# Fatal javascript OOM in Reached heap limit
#

/usr/local/bin/quarto: line 128:  2027 Trace/breakpoint trap   (core dumped) "${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_ARGMAP}" "${QUARTO_TARGET}" "$@"
```

This is the config we have:

```
---
execute:
  echo: false
jupyter: python3
format:
  html:
    toc: true
    toc-depth: 4
    toc-location: left
    html-math-method: katex
    font-family: Inter,sans-serif
    smooth-scroll: true
    citations-hover: false
    footnotes-hover: false
    code-fold: true
    code-summary: "Show the code"
    code-overflow: wrap
    theme: cosmo
    fontsize: 1.1em
    linestretch: 1.7
---
```

I removed `self-contained` as discussed here: https://github.com/quarto-dev/quarto-cli/issues/1263 

I appologise I do not have a reproducible example. I have tried different linux distos such as Amazon Linux 2 and Ubuntu 22.04. Any ideas on how I might resolve this? Thank you.

### Checklist

- [ ] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [x] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [x] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [x] Please document the operating system you're running. If on Linux, please provide the specific distribution.
dragonstyle
2022-09-16T04:27:38Z
nadnerb
bug deno triaged-to
v1.4
open
Fatal javascript OOM in Reached heap limit on render html
https://github.com/quarto-dev/quarto-cli/issues/2462