microsoft / microsoft/TypeScript

Pasting plain text is very slow now

未关闭
#61,112 4 条评论 4 个 reaction 已指派 1 人 已被 @navya9singh 认领 在 GitHub 查看
Needs Investigation
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

Repro:

1. Open src\vs\editor\contrib\suggest\test\browser\completionModel.test.ts
2. Select all
3. Copy
4. Create src\vs\workbench\services\suggest\test\browser\simpleCompletionModel.test.ts
5. Paste
6. Scroll up, 🐛 I frequently see a spinner when pasting, didn't this used to essentially be instantaneous?

![Image](https://github.com/user-attachments/assets/b4e150d5-e1d9-4265-9db6-eacdcbcfacbe)

v1.97 insiders took around 424ms from ctrl+v to the content showing

![Image](https://github.com/user-attachments/assets/feecd895-dc09-448f-8da2-1e92f2b3fef8)

[insiders-trace.json](https://github.com/user-attachments/files/18641589/insiders-trace.json)

v1.89.1 stable took around 20ms

![Image](https://github.com/user-attachments/assets/dd8e1f5c-1a55-4613-a5ef-c36552fc6cba)

[stable-trace.json](https://github.com/user-attachments/files/18641585/stable-trace.json)

AFAICT plain text is the default for `editor.pasteAs.preferences` and we therefore should not seemingly be waiting on extensions or anything else to provide any information before adding the content to the buffer. This makes the editor feel so slow imo.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。