-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve startup performance & status (#6210)
This change improves the startup experience in the Positron Console and also contains performance improvements that significantly decrease startup time (especially in dev builds) Before the change, the console would say "Starting..." / "Starting up..." for several seconds before a console opened. https://github.com/user-attachments/assets/64c998c9-c855-4b9c-a58e-70823353aaa2 After it, in most Positron sessions no noticeable time will be spent in either state; instead, Positron will show you the interpreter it's working on starting. https://github.com/user-attachments/assets/e68f12e1-4df0-41b4-bb66-15ca24c76e50 Still more we could do to make this better, such as improving the styling and coordinating better with console startups, but want to minimize overlap with multi-console work. Addresses #3566. ### Release Notes #### New Features - Speed up console startup and show which interpreter will start (#3566) #### Bug Fixes - N/A ### QA Notes You will see the new experience when Positron knows what runtime to start, but mostly the old one when Positron has to discover all interpreters (though even discovery will be a little faster now since it starts earlier). Specifically, you should see it: - when a runtime is affiliated with the workspace - when R or Python recommend a runtime for the workspace (currently NYI but will be implemented in those language packs in e.g. #6208. - when reloading a window Test tags: `@:console`
- Loading branch information
Showing
9 changed files
with
221 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/vs/workbench/contrib/positronConsole/browser/components/runtimeStartupProgress.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (C) 2025 Posit Software, PBC. All rights reserved. | ||
* Licensed under the Elastic License 2.0. See LICENSE.txt for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
.runtime-starting { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.runtime-starting .action, | ||
.runtime-starting .runtime-name { | ||
margin: 2px; | ||
text-transform: uppercase; | ||
text-align: center; | ||
} | ||
|
||
.runtime-starting .action { | ||
font-size: 11px; | ||
} | ||
|
||
.runtime-starting .runtime-name { | ||
font-weight: bold; | ||
} | ||
|
||
.runtime-starting-icon { | ||
height: 50px; | ||
} |
45 changes: 45 additions & 0 deletions
45
src/vs/workbench/contrib/positronConsole/browser/components/runtimeStartupProgress.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (C) 2025 Posit Software, PBC. All rights reserved. | ||
* Licensed under the Elastic License 2.0. See LICENSE.txt for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
// CSS. | ||
import './runtimeStartupProgress.css'; | ||
|
||
// React. | ||
import React from 'react'; | ||
|
||
// Other dependencies. | ||
import { localize } from '../../../../../nls.js'; | ||
import { IRuntimeAutoStartEvent } from '../../../../services/runtimeStartup/common/runtimeStartupService.js'; | ||
|
||
// RuntimeStartupProgressProps interface. | ||
export interface RuntimeStartupProgressProps { | ||
evt: IRuntimeAutoStartEvent; | ||
} | ||
|
||
const preparing = localize('positron.runtimeStartup.newSession', "Preparing"); | ||
const reconnecting = localize('positron.runtimeStartup.existingSession', "Reconnecting"); | ||
|
||
/** | ||
* RuntimeStartupProgress component. | ||
* | ||
* This component renders the status for a runtime that is about to start up. | ||
* It's only rendered before any runtime actually starts in new Positron | ||
* windows. | ||
* | ||
* @param props A RuntimeStartupProgressProps that contains the component | ||
* properties. | ||
* @returns The rendered component. | ||
*/ | ||
export const RuntimeStartupProgress = (props: RuntimeStartupProgressProps) => { | ||
// Render. | ||
return ( | ||
<div className='runtime-starting'> | ||
<img className='runtime-starting-icon' src={`data:image/svg+xml;base64,${props.evt.runtime.base64EncodedIconSvg}`} /> | ||
<div className='runtime-name'>{props.evt.runtime.runtimeName}</div> | ||
<div className='action'>{props.evt.newSession ? preparing : reconnecting}</div> | ||
</div> | ||
); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.