pieces-app / support

19 stars 3 forks source link

Pasting in VS Code causes delay #271

Open Avonbek opened 4 months ago

Avonbek commented 4 months ago

Software

VS Code

Operating System / Platform

Windows

Your Pieces OS Version

9.0.7

Early Access Program

Kindly describe the bug and include as much detail as possible on what you were doing so we can reproduce the bug.

Sometimes I notice pasting in VS Code causes a delay of around 2-5 seconds. When I disable Pieces it no longer occurs. Specifically, it is pasting anywhere within the code, not necessarily inside the chat assistant. If it happens frequently, I am forced to turn off pieces, otherwise workflow is significantly disrupted.

mack-at-pieces commented 4 months ago

Heya @Avonbek - Thanks so much for bringing this to our attention. Our team will look into this ASAP and report back.

In the meantime, do you mind sharing the version of Windows you're running as well as your VS Code version?

Thanks!

Avonbek commented 4 months ago

VS Code Version: 1.91.0-insider (user setup) OS: Windows_NT x64 10.0.19045 Build 19045

BTW, I'd like to take the time to let you guys know I really like the project so far. Once some of the bugs are ironed out, I have a feeling this (and other applications like it) are going to be the new standard for code assistant setups. Keep up the good work!

caleb-at-pieces commented 4 months ago

Hey @Avonbek , thank you for bringing this to our attention! I see you are using the VS Code Insiders build, could you please let me know if this issue is also present on the production version of VS Code? I've looked into this, and there's nothing clear cut that might be causing this on our end, so some more information would be great here to get this resolved!

Avonbek commented 4 months ago

I have tested it on two different machines, and with both insiders and regular VS Code. I've noticed it on both, but I should also mention it doesn't happen 100% of the time, so I can understand that it would be hard to debug. If other people aren't noticing this problem, it's possible it simply has to do with the specs of my two machines, as they are both somewhat old.

I will try to keep an eye on it, perhaps I can determine some more information that would be helpful.

caleb-at-pieces commented 4 months ago

@Avonbek Thank you for this information, I'm currently on the same boat as you, this is probably a performance issue. With that in mind I'll be searching for some clever solutions / optimizations that should fix this. In the mean time, you can try to resolve this by temporarily removing / rebinding the key-bind on the 'paste' command in the VS Code extension, I think this will prevent the slowdown you are seeing.

Do you have some other extension(s) that might be using a lot of resources on your machine? If you want we can hop on a call about this and I can try to investigate this some more with you live. Here's my calendar link: https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ3IijT1qgm0GgFeIllIuyy5ehWktuYQiPI6jegH4HlNGApAOMMVPiWCcoj_2aPfvgUiDmHHKcQE

Here are some instructions to remove the key bind that I think is causing this slowdown (I'm not 100% sure so please let me know if this resolves the issue for now):

  1. Open keyboard shortcuts by pressing Ctrl+K Ctrl+S
  2. search '@ext:MeshIntelligentTechnologiesInc.pieces-vscode'
  3. find the 'paste' command, it should have a shortcut of ctrl + v
  4. rebind this to something else

It should be noted that ctrl + v should still work as expected after doing this, just without the delay.

Avonbek commented 4 months ago

My plan is to wait until I notice the bug, then try your fix to see if it works. If it doesn't, I might hop on a call at some point. So far I haven't noticed the slowdown today, so I want to at least wait and ensure it's still a problem that consistently arises. If I don't notice the slowdown in the near future, I'll let you know. Thanks for taking the time to investigate, I appreciate it.

Avonbek commented 4 months ago

Checking back in, I went an entire work session without encountering the bug. I was using regular VS Code and had OS, Desktop, and VS Code extension running. It's always possible it might resurface, but I would consider this a good sign. Maybe the machine ghosts have decided to give it a rest. Thanks again for looking into it.

caleb-at-pieces commented 4 months ago

@Avonbek Amazing! Thanks for letting me know.