Repository: vscode
Issue: Text selection and scrolling is slow
Labels: bug,freeze-slow-crash-leak,editor-core

Type: <b>Performance Issue</b>

> Issue troubleshooting has identified that the issue is with Visual Studio Code. 

I can reproduce it by opening a 1000-2000 line file and being on battery saver mode. Turning off battery saver mode helps, but it's still slower than it should be. E.g. selection in [this](https://github.com/gfx-rs/wgpu/blob/trunk/wgpu-hal/src/vulkan/adapter.rs) file around line 140 is especially slow.
On insiders (1.86.0-insider 279872bd965e4030c81129a9bf1ce1710ff7cd55) it's still slow, but seems a bit faster than 1.85.1.

VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:47:11.635Z)
OS version: Linux x64 6.6.7-arch1-1
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 1299)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>video_decode: enabled<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|1, 1, 1|
|Memory (System)|15.34GB (9.22GB free)|
|Process Argv|--unity-launch --crash-reporter-id 38cc4293-5223-4300-8642-8985386ac132|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|gnome|
|XDG_CURRENT_DESKTOP|GNOME|
|XDG_SESSION_DESKTOP|gnome|
|XDG_SESSION_TYPE|wayland|
</details><details>
<summary>Process Info</summary>

```
CPU %	Mem MB	   PID	Process
    0	   157	 14352	code main
    0	    47	 14355	   zygote
    0	   189	 14391	     gpu-process
    0	    47	 14356	   zygote
    0	     0	 14358	     zygote
    0	   456	 14433	window [1] (command.rs - engine-test - Visual Studio Code)
    0	    94	 15931	window [2] (Issue Reporter)
    0	    63	 14396	   utility-network-service
    0	   110	 14452	shared-process
    0	    79	 15671	fileWatcher [1]
    0	   126	 15955	extensionHost [1]
    0	    63	 15975	     electron-nodejs (/opt/visual-studio-code/code --ms-enable-electron-run-as-node /opt/visual-studio-code/resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=15955)
```

</details>
<details>
<summary>Workspace Info</summary>

```
|  Window (command.rs - engine-test - Visual Studio Code)
|    Folder (engine-test): 14093 files
|      File types: bin(1982) gltf(1696) o(1587) bc(1552) json(813)
|                  timestamp(810) d(760) rmeta(692) rlib(369) rs(346)
|      Conf files: launch.json(1) settings.json(1) tasks.json(1)
|      Launch Configs: cppvsdbg lldb;
```

</details>
Extensions: none<details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30899288
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
282f8724:30602487
f6dab269:30613381
showlangstatbar:30737416
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialogc:30910334
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:30885897
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
dsvsc019cf:30917260
cp7184c:30925681

```

</details>

<!-- generated by issue reporter -->