mirror of
https://github.com/bwya77/vscode-dark-islands.git
synced 2026-05-09 08:25:35 +02:00
[PR #126] perf: promote canvas containers to GPU compositor layer #130
Labels
No labels
bug
bug
duplicate
enhancement
enhancement
Missing Info
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vscode-dark-islands#130
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/bwya77/vscode-dark-islands/pull/126
Author: @McSon2
Created: 5/3/2026
Status: 🔄 Open
Base:
main← Head:perf/gpu-layer-promotion📝 Commits (1)
c6a6541perf: promote canvas containers to GPU compositor layer📊 Changes
1 file changed (+25 additions, -6 deletions)
View changed files
📝
settings.json(+25 -6)📄 Description
Summary
The
border-radius: var(--islands-panel-radius) !important; overflow: hidden !important;combo on.part.editorand.part.panel.bottomcauses noticeable lag in the editor and terminal on slower machines. Every time the Monaco editor canvas or the xterm canvas redraws (which is constantly during typing/scrolling), the rasterizer has to re-clip the canvas to the rounded shape on the CPU compositing path, because the rounded clip lives on a non-promoted layer.This PR forces those containers onto their own GPU compositor layer so the rounded clip is applied once per frame at composite time, on the GPU, instead of being recomputed every time the canvas redraws.
The fix adds four properties to the canvas containers:
isolation: isolatetransformdoesn't escape and z-index ordering stays predictabletransform: translateZ(0)will-change: transformcontain: paintAffected selectors:
.part.editor.part.panel.bottom.part.panel.bottom > .content.part.panel.bottom .terminal-outer-container.part.panel.bottom .terminal.xterm.notebookOverlayVisual change
None. The rounded corners, glass borders, shadows and overall look are identical — this is purely a rendering-pipeline optimization.
Test plan
settings.jsonis still valid JSONnpm run dev, Monaco at scroll) and confirm typing latency / terminal redraw is back to baseline.monaco-workbench.linux .part.editor > .contentis untouched but the layer promotion on.part.editorcould interact with it)Notes
The same
border-radius + overflow:hiddenpattern exists on the sidebar (.part.sidebar,.part.auxiliarybar) but those don't lag, because their content is regular DOM rather than<canvas>— DOM clipping in rounded corners is essentially free, canvas clipping is not. So I deliberately did not add the GPU promotion there: it would create extra compositor layers for no gain.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.