posit-dev / posit-dev/positron

Parallelize project initialization tasks

Open
#3,435 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: folder template enhancement
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Background

When a new project (created via the project wizard) is being initialized, a series of tasks is run to set up things like: initializing the project directory as a git repo, creating an environment for the project, creating empty files, etc..

Currently, we've ordered the tasks in a sequence that prioritizes the shorter tasks first, to provide the user with some sense of progress. If the longer tasks ran first, it could seem like nothing was occurring. https://github.com/posit-dev/positron/issues/3293 covers showing a notification that clearly indicates the project initialization progress.

https://github.com/posit-dev/positron/blob/93ad6f239fe5ddbbfe1ae8013d2ab61fb0b3417d/src/vs/workbench/services/positronNewProject/common/positronNewProjectService.ts#L160-L186

Proposal

It would be nice to try to run the steps concurrently when possible, to reduce the amount of time project initialization takes. A user should be able to jump into their new project promptly. In particular, creating an environment takes several seconds, so it would be ideal if we can start that task as soon as possible, while also running some quicker tasks at the same time.

This should coordinate with https://github.com/posit-dev/positron/issues/3293 appropriately. Running tasks concurrently may trigger multiple notification toasts at the same, which could be overwhelming.

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

Start by reading src/vs/workbench/services/positronNewProject/common/positronNewProjectService.ts around lines 160-186 to understand the current initialization sequence. Review issue 3293 for the related progress notification work. Done means compatible tasks can run concurrently, the environment starts earlier, and concurrent notifications are coordinated so they do not overwhelm users.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.