Repository: neovim
Issue: clipboard registers + and * are slow on WSL2
Labels: bug,performance,clipboard,platform:wsl

### Problem

Posting this after reading #21739, #11804, [this Reddit post](https://www.reddit.com/r/neovim/comments/17udtc4/clipboard_is_slow_after_setting_gclipboard_wsl2/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button), and also [this Reddit post](https://www.reddit.com/r/neovim/comments/17ieyn2/comment/kd9vt97/?utm_source=share&utm_medium=web2x&context=3). I'm writing a new issue since most of these conversations are about the setting `set clipboard=unnamedplus`, but I didn't need to do that to reproduce the issue. Moreover, I wanted to give a relatively thorough overview of things I've tried to solve this issue without an avail on my end.

I've been using Neovim for over a year now on Windows and WSL2 Ubuntu, mostly on the same laptop. I used to `set clipboard=unnamedplus` in my config until I encountered the issue in #11804 some time ago and a slow startup for Neovim. Because of this, I migrated to primarily using Neovim on WSL2 Ubuntu. The issue still persisted, so I removed this option, and opted for manually using the `+` and `*` registers (I'm fine with this, since I'm used to many vim clones that don't let you set a .vimrc), but the slow pasting issue from #21739 still persists. 

The issue worsens when used with [which-key.nvim](https://github.com/folke/which-key.nvim), with delays lasting over 10 seconds. 

Even though some of the suggestions listed down below improve the issue, the issue of slow pasting still remains. It's also highly worth mentioning that this issue *does not exist in native Vim* without any configurations.

### Steps to reproduce

On Ubuntu WSL2:
1. run `nvim --clean -u minimal.lua`. `minimal.lua` file located in `~/.config/nvim`. 
2. Write anything, in the buffer i.e. `testing`, for the sake of testing yanking and pasting later.
3. Try yanking what you wrote to the * or + register, i.e. `viw"+y` to yank `testing` to the + register. May take between ~3-5 seconds on first use, but is usually instant afterwards.
4. Try pasting what is in the * or + register in a separate line, i.e. `viw"+y` to yank `testing` to the + register. This should be consistently slow, again ~3-5 seconds.

Notes: 
When trying suggestions to add to `init.lua` from different sources, I got the following results:
- `:h clipboard-wsl` - no difference
- [u/nicolas9653's suggestion](https://www.reddit.com/r/neovim/comments/17ieyn2/comment/kd9vt97/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) - Inconsistent: sometimes instant, but sometimes just as slow
- [u/aleksandroparin's suggestion](https://www.reddit.com/r/neovim/comments/17udtc4/comment/k9fdffc/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) - Inconsistent: sometimes instant, but sometimes just as slow
- [3N4N's suggestion from #21739](https://github.com/neovim/neovim/issues/21739#issuecomment-1378283986) - Yanking and pasting initially instant, but repeated use makes it take progressively longer
- [rickywu's suggestion from #21739](https://github.com/neovim/neovim/issues/21739#issuecomment-1378304749) - Yanking almost always instant, pasting mostly instant but repeated use lags egregiously until new yank into these registers

Each of their relevant suggestions was added under under `-- ADD INIT.LUA SETTINGS _NECESSARY_ FOR REPRODUCING THE ISSUE` in `minimal.lua`.

### Expected behavior

Consistently instant yank/paste times from the `+` and `*` registers, comparable to that in Native Vim.

### Neovim version (nvim -v)

0.10.0

### Vim (not Nvim) behaves the same?

no, vim 8.2.2121

### Operating system/version

Windows 11

### Terminal name/version

Windows Terminal 1.20.11781.0

### $TERM environment variable

xterm-256color

### Installation

build from repo