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
Improve speed of console when it contains a lot of output #6042
Execute a command that creates lots of R console output, several times.
Attempt to execute a command in the R console
Problem
As the R console output grows, the console gets progressively more sluggish (and the rest of the UI can too). There's lag between pressing a key and seeing a letter appear, and between pressing Enter and having the command submit.
This happens because the number of DOM elements grows unbounded, and the browser struggles with layouts/reflows as a result.
We currently cap the number of lines in the console history to 1000 to help mitigate this effect, but that's an undesirable solution long-term:
1000 lines is not enough to capture long script outputs (arguably those should be captured with sink() but that's very sophisticated for some users)
1000 lines is--simultaneously--too many for some machines to handle; in recent versions of Chrome this seems to have gotten worse.
We made it possible for users to adjust this themselves in #5919, which provides some limited mitigation for the users experiencing the most pain, but the best solution here is probably to virtualize the console contents, perhaps using Ace or similar, so that we don't have to manage the whole thing in the DOM.
Note
In RStudio 1.3 it is possible to mitigate this with an option, so make sure it's disabled:
Verified that the performance issue seems to have gone away with this change. Tested with latest dailies. Aside from the strangeness reported in #7918.
There is an outstanding bug (#8428) that may or may not be a blocker for the customer. I'm actively working on the fix but it's not ready yet. If they get latest, by default, the new feature that limits console output will be turned on.
Activity
rmccombie commentedon Feb 25, 2020
Additional internal support ticket: 44727
kevinushey commentedon Oct 15, 2020
I'm still seeing code cut off in unexpected ways with this feature on:
It seems like, after a particular piece of console input, we're only retaining the last 1000 lines of output.
kevinushey commentedon Oct 15, 2020
After reloading the UI (Right click -> Reload), I see after trying to scroll back to the top:
So it seems like the console history is then truncated in the "regular" way.
gtritchie commentedon Oct 15, 2020
@kevinushey Want to add your findings to #7918
Seems like essentially the same problem?
kevinushey commentedon Oct 15, 2020
Thanks! I've done so.
kfeinauer commentedon Nov 16, 2020
Verified that the performance issue seems to have gone away with this change. Tested with latest dailies. Aside from the strangeness reported in #7918.
rmccombie commentedon Dec 1, 2020
Is there a preview release I can suggest in 44727?
adamconroy commentedon Dec 1, 2020
There is an outstanding bug (#8428) that may or may not be a blocker for the customer. I'm actively working on the fix but it's not ready yet. If they get latest, by default, the new feature that limits console output will be turned on.