posit-dev / posit-dev/positron

performance: sending lots of code to the Console results in a slowdown compared to sourcing the file

Open
#8,907 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug lang: r performance
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Positron Version: 2025.08.0 build 130
Code - OSS Version: 1.102.0
Commit: 76ddce5
Date: 2025-08-01T20:08:51.894Z
Electron: 35.6.0
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Darwin arm64 23.6.0

Session details: R version 4.4.2 (2024-10-31)

Describe the issue:

I often sending multiple R scripts to Console by selecting all (Cmd + A) and run (Cmd + Enter) for each script.
E.g.
1_ReadDataAndPackages.R
2_Cleaning.R
3_Analysis.R
4_Plot.R
5_Reports.R
I run all the R code in "1_ReadPackages.R" first and then "2_Cleaning.R", "3_Analysis.R", "4_Plot.R" and "5_Reports.R". My data has around 10,000 rows and 150 columns at the stage of "1_ReadDataAndPackages.R".
In RStudio it took approximately 1.5 minutes to run the five R scripts, whereas in Positron it took 5 minutes, which was more than three times longer.

Expected or desired behavior:

Could anyone please tell me why this happens? If so, I would appreciate it if you could share how to deal with this problem.
Sorry for not being able to give an example here due to the nature of privacy.

Thanks in advance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no repository files, tests, or reproducible scripts. Start by reproducing the slowdown with representative R scripts and compare sending selections to the Console with sourcing files; done means the cause is identified and the performance difference is addressed or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.