I put in a bug report for this years ago but it got ignored :( https://github.com/microsoft/vscode/issues/137066
Vscode has gotten slower over time. It's true you can't get nanosecond performance out of JS, but anything under 17ms should be trivial. I believe the vscode developers are skilled, it's just they don't care (imo) enough about performance for whatever reason, and that's a shame.