You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RStudio very slow when running code from markdown (rmd) in projects on network drives #8034
This problem has been reported several times in the RStudio Community: When working with a project that is located on a network drive (Windows default net use), RStudio becomes painfully slow.
The problem does not occur in network-located projects per se. When runing code in the console, that is fast. But as soon as the code is in a markdown editor (rmd file) and runs from there, there seems to be an issue with output caching. Even code that only defines functions is executed slow.
Knitting the rmd to HTML or PDF works fast and without problems, therefore this seems a issue with the markdown editor.
Yes, I will add to this, as I would not want this issue to go stale. I am working with an up-to-date version in November of 2021. For me, it appears to be associated with importing Kable graphics with a lot of options set. The best solution that I can come up with is to turn of the refresh automatically option on the Environment Window that comes up when editing the RMD file.
I don't know if it helps as I'm not at all well versed in the arts of computer sciences but I have noticed that when I splitted my Rmarkdown files in several .Rmd instead of having one long file it seemed to greatly reduce the problem.
I have no idea how to prove or test rigorously for this but if it makes sens for someone I won't regret this post.
Thanks for investigating this issue and have a great day!
Cheers
thanks @kevinushey and @LafontRapnouilTristan. I now develop Quarto published documents entirely on local drive, instead of network file share. This is working well.
Following your observations, @LafontRapnouilTristan I've just now tested if slow down occurs on my setup when using network drive with both large (700 lines over 40 chunks) and smaller (100 lines with 3 chunks). I can confirm that for my situation, the dramatic slow down in Quarto document preview occurs in both small and large qmd documents, only when the project and qmd files reside on a Microsoft Window's file server.
Small qmd and large exhibit this slow behaviour consistently on my platform and Quarto version shown below.
My test chunk consisted of a call to a function to render a leaflet map (htmlwidget) with 7 layers. Switching to "Visual" to get preview:
TEST 1: If qmd and project is stored locally on laptop, this renders in under 1 second reliably. (my baseline)
TEST 2: If qmd (part of qmd containing 3 chunks) and project is stored on Windows file server, this same leaflet map in a single chunk renders very slowly in 1 minute 2 seconds (my 1st comparison)
TEST 3: If qmd (part of qmd containing 40 chunks) and project is stored on Windows file server, this same leaflet map in a single chunk renders slowly in 1 minute 4 seconds (my 2nd comparison)
Something is slowing down Quarto's Preview in R Studio by a factor of roughly 60 when R project and qmd are on Microsoft Windows file share. Thanks for investigating the possible cause @kevinushey.
I don't have any slow down of execution outside of the Quarto "Visual" preview.
Leaflet maps render to the R Studio Viewer from chunk in under 1 second.
Locally, for the large test I can render all 40 chunks (each contains a htmlwidget such as leaflet map) to a complex html document in under a minute, but only if it's locally stored.
Quick solution/ workaround? Work locally. Synch your code to github and sometimes backup to Windows file share.
I hope this helps someone - because when it's running quickly, Quarto makes very impressive and flexible documents.
RStudio 2023.06.2+561 "Mountain Hydrangea" Release (de44a31, 2023-08-25) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.06.2+561 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36
Yes – I will download now and check for us.
I’ll do a baseline working locally checking the speed. Then I’ll check if running from network drive on Windows still exhibits speed issue.
Thank you very much for investigating the issue, and incorporating a possible fix into the daily build. 😉
From: Kevin Ushey ***@***.***>
Sent: 25 September 2023 18:04
To: rstudio/rstudio ***@***.***>
Cc: Ivan Lambert ***@***.***>; Comment ***@***.***>
Subject: External: Re: [rstudio/rstudio] RStudio very slow when running code from markdown (rmd) in projects on network drives (#8034)
Daily builds are up at https://dailies.rstudio.com/ -- would anyone experiencing this issue be willing to download a recent daily build of RStudio and let us know if the issue still persists?
—
Reply to this email directly, view it on GitHub<#8034 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BBIZHQY6CWSQBM66SL2B3ATX4G2Q7ANCNFSM4SLUKC6Q>.
You are receiving this because you commented.Message ID: ***@***.***>
Confidentiality:- This email, its contents and any attachments are intended only for the above named. As the email may contain confidential or legally privileged information, if you are not, or suspect that you are not, the above named or the person responsible for delivery of the message to the above named, please delete or destroy the email and any attachments immediately and inform the sender of the error.
```
Hi Kevin,
I’ve downloaded daily ……
RStudio 2023.09.0+463 "Desert Sunflower" Release (b51c81c, 2023-09-24) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.09.0+463 Chrome/114.0.5735.289 Electron/25.5.0 Safari/537.36
…..Which to me looked like the latest build (Desert Sunflower)? (please let me know if I have the version that incorporates your changes to address #8034).
TEST RESULTS
------------------
TEST1 – Check if working locally with project file and qmds on C: Drive is running normally.
RESULT for TEST1 – all appears OK – good execution speed in “Visual”.
TEST2 – Check if working on network drive with project file and qmds on L: Drive (a Windows 2019 file share) is running normally/quickly.
RESULT for TEST2– still very slow at executing Quarto project code within “Visual” preview.
Same situation as my previous stable build of R-Studio.
On +463, the green bar showing execution progress is many times slower, assignments and other simple statements execute one every ~0.5 seconds.
More complex functions that render multi-layered leaflet maps take about 60 seconds per map to display……
All renders eventually, but on +463 the speed is still very slow when project/qmd is on network drive – about one sixtieth of normal speed compared to working locally.
***@***.***
Thanks,
Ivan
```
From: Kevin Ushey ***@***.***>
Sent: 25 September 2023 18:04
To: rstudio/rstudio ***@***.***>
Cc: Ivan Lambert ***@***.***>; Comment ***@***.***>
Subject: External: Re: [rstudio/rstudio] RStudio very slow when running code from markdown (rmd) in projects on network drives (#8034)
Daily builds are up at https://dailies.rstudio.com/ -- would anyone experiencing this issue be willing to download a recent daily build of RStudio and let us know if the issue still persists?
—
Reply to this email directly, view it on GitHub<#8034 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BBIZHQY6CWSQBM66SL2B3ATX4G2Q7ANCNFSM4SLUKC6Q>.
You are receiving this because you commented.Message ID: ***@***.***>
Confidentiality:- This email, its contents and any attachments are intended only for the above named. As the email may contain confidential or legally privileged information, if you are not, or suspect that you are not, the above named or the person responsible for delivery of the message to the above named, please delete or destroy the email and any attachments immediately and inform the sender of the error.
Thanks @ivanlambert1975 -- sorry, I should have been more specific; the fix is in the daily builds for Ocean Storm. Those Windows builds are available here:
Hi Kevin,
Sorry this has taken a long while to test and report back.
Downloaded version of R Studio:
RStudio 2023.12.0-daily+46 "Ocean Storm" Daily (5eaa4d5, 2023-09-21) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.12.0-daily+46 Chrome/114.0.5735.289 Electron/25.5.0 Safari/537.36
Tested rending of Quarto document in Visual mode using local and network as comparison.
TEST1 – the qmd files are stored locally on C:
Visual preview runs quick and displays results – but I couldn’t get the htmlwidgets to render inline in chunks within Visual.
TEST2 – the qmd files are stored on mapped network drive L:/
in great contrast to older stable version of R Studio, this version Ocean Storm executes qmds now just as quick as local qmds in Visual preview.
However, again as above, I couldn’t get the htmlwidgets to render inline in chunks within Visual.
When the chunks are rendered, the Visual preview jumps to the top of the document and the plot is rendered, not inline but within the plot window.
I’ve tried switching from Source to Visual and back again, but I cannot get chunks rendered when the green execute arrow is clicked upon.
The speed issue looks fixed, I’m not sure if I’m doing something unexpected that would affect the rendering in Visual preview mode?
The chart in plot window, would have normally been rendered inline below the code chunk
I hope this helps.
Thanks,
Ivan
***@***.***
------
title: "CDP"
author: "BI"
date: "3/10/2023"
format:
html:
fig-width: 12
fig-height: 10
code-fold: true
css: styles.css
theme:
- yeti
- output_style.scss
docx: default
revealjs:
slide-number: true
chalkboard:
buttons: false
preview-links: auto
logo: images/quarto.png
css: styles.css
From: Kevin Ushey ***@***.***>
Sent: 25 September 2023 20:07
To: rstudio/rstudio ***@***.***>
Cc: Ivan Lambert ***@***.***>; Mention ***@***.***>
Subject: External: Re: [rstudio/rstudio] RStudio very slow when running code from markdown (rmd) in projects on network drives (#8034)
Thanks @ivanlambert1975<https://github.com/ivanlambert1975> -- sorry, I should have been more specific; the fix is in the daily builds for Ocean Storm. Those Windows builds are available here:
https://dailies.rstudio.com/rstudio/ocean-storm/electron/windows/
—
Reply to this email directly, view it on GitHub<#8034 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BBIZHQZYCNYCF5ACGHG7B33X4HI33ANCNFSM4SLUKC6Q>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
Confidentiality:- This email, its contents and any attachments are intended only for the above named. As the email may contain confidential or legally privileged information, if you are not, or suspect that you are not, the above named or the person responsible for delivery of the message to the above named, please delete or destroy the email and any attachments immediately and inform the sender of the error.
Activity
stale commentedon Feb 4, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.
BurninLeo commentedon Feb 5, 2021
unstale ... the issue still persists in RStudio 1.14.1103
emjonaitis commentedon Feb 12, 2021
Seconding that this is not a stale issue. RStudio has become nearly unusable for me.
scebbers commentedon Aug 26, 2021
True for me as well!
lukepc commentedon Nov 5, 2021
Still the case for me, running 2021.09.0 Build 351.
HEHenson commentedon Nov 21, 2021
Yes, I will add to this, as I would not want this issue to go stale. I am working with an up-to-date version in November of 2021. For me, it appears to be associated with importing Kable graphics with a lot of options set. The best solution that I can come up with is to turn of the refresh automatically option on the Environment Window that comes up when editing the RMD file.
28 remaining items
LafontRapnouilTristan commentedon Sep 21, 2023
Hi,
I don't know if it helps as I'm not at all well versed in the arts of computer sciences but I have noticed that when I splitted my Rmarkdown files in several .Rmd instead of having one long file it seemed to greatly reduce the problem.
I have no idea how to prove or test rigorously for this but if it makes sens for someone I won't regret this post.
Thanks for investigating this issue and have a great day!
Cheers
ivanlambert1975 commentedon Sep 21, 2023
Good Afternoon,
thanks @kevinushey and @LafontRapnouilTristan. I now develop Quarto published documents entirely on local drive, instead of network file share. This is working well.
Following your observations, @LafontRapnouilTristan I've just now tested if slow down occurs on my setup when using network drive with both large (700 lines over 40 chunks) and smaller (100 lines with 3 chunks). I can confirm that for my situation, the dramatic slow down in Quarto document preview occurs in both small and large qmd documents, only when the project and qmd files reside on a Microsoft Window's file server.
Small qmd and large exhibit this slow behaviour consistently on my platform and Quarto version shown below.
My test chunk consisted of a call to a function to render a leaflet map (htmlwidget) with 7 layers. Switching to "Visual" to get preview:
TEST 1: If qmd and project is stored locally on laptop, this renders in under 1 second reliably. (my baseline)
TEST 2: If qmd (part of qmd containing 3 chunks) and project is stored on Windows file server, this same leaflet map in a single chunk renders very slowly in 1 minute 2 seconds (my 1st comparison)
TEST 3: If qmd (part of qmd containing 40 chunks) and project is stored on Windows file server, this same leaflet map in a single chunk renders slowly in 1 minute 4 seconds (my 2nd comparison)
Something is slowing down Quarto's Preview in R Studio by a factor of roughly 60 when R project and qmd are on Microsoft Windows file share. Thanks for investigating the possible cause @kevinushey.
I don't have any slow down of execution outside of the Quarto "Visual" preview.
Leaflet maps render to the R Studio Viewer from chunk in under 1 second.
Locally, for the large test I can render all 40 chunks (each contains a htmlwidget such as leaflet map) to a complex html document in under a minute, but only if it's locally stored.
Quick solution/ workaround? Work locally. Synch your code to github and sometimes backup to Windows file share.
I hope this helps someone - because when it's running quickly, Quarto makes very impressive and flexible documents.
RStudio 2023.06.2+561 "Mountain Hydrangea" Release (de44a31, 2023-08-25) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.06.2+561 Chrome/110.0.5481.208 Electron/23.3.0 Safari/537.36
quarto_version()
[1] ‘1.3.450’
kevinushey commentedon Sep 22, 2023
I've just merged a potential fix for this issue -- if all goes well, the next daily builds should be ready for testing.
kevinushey commentedon Sep 25, 2023
Daily builds are up at https://dailies.rstudio.com/ -- would anyone experiencing this issue be willing to download a recent daily build of RStudio and let us know if the issue still persists?
ivanlambert1975 commentedon Sep 25, 2023
olivroy commentedon Sep 25, 2023
ivanlambert1975 commentedon Sep 25, 2023
kevinushey commentedon Sep 25, 2023
Thanks @ivanlambert1975 -- sorry, I should have been more specific; the fix is in the daily builds for Ocean Storm. Those Windows builds are available here:
https://dailies.rstudio.com/rstudio/ocean-storm/electron/windows/
ivanlambert1975 commentedon Oct 3, 2023
kevinushey commentedon Oct 3, 2023
Thank you @ivanlambert1975 -- it's great to hear the speed issues appear to be resolved!
Would you be willing to file a new issue, capturing this particular issue? We can try to take a look at this as well.
ronblum commentedon Oct 18, 2023
Marking as fixed based on the verification above.
rfbrondum commentedon Dec 21, 2023
I seem to have a similar problem with Rmarkdown documents after upgrading to Rstudio 2023.12.0-369 - had no problem before the update.
kevinushey commentedon Dec 27, 2023
@rfbrondum can you please file a new issue with more details on what exactly you're seeing / experiencing?