Rmarkdown preview is very slow


I used R markdown to create a html notebook (actually r notebook). By adding pictures without other coding processes, at first it ran fluently, but when I put more and more it appears that when I pressed preview which basically generate file nb.html, the Rstudio process very slow. The size of my note book is 13.2 MB. Does anyone know how to fix this ?


It makes sense that it would take longer if you're adding more images. I'm not sure how much detail you'll get, given that there's not code inside of your document, but you could try running profvis around rmarkdown::render().

profvis::profvis ({