You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slow typing due to getPositionOffsetTransformerFromTextModel #247124
I have noticed a massive slowdown while typing. I profiled, each keystroke would take 180ms to process and some showed createStateWithAppliedEdit as the problem
I had a very quick look at this. I'm not sure what would cause this to being so slow. Johannes Rieken (@jrieken) where you typing in a very large file? Henning Dieterichs (@hediet) please check this out when you are back
Managed to debug this. It looks like we keep calling getPositionOffsetTransformerFromTextModel (as I type) and this function creates the whole string of a text document, loops over that to break it into lines so that it can build a position-to-offset transformation. This is slow and questionable because the text document has these features natively builtin
changed the title [-]Slow typing (due to `createStateWithAppliedEdit`?)[/-][+]Slow typing due to `getPositionOffsetTransformerFromTextModel`[/+]on Apr 23, 2025
Activity
benibenj commentedon Apr 22, 2025
I had a very quick look at this. I'm not sure what would cause this to being so slow. Johannes Rieken (@jrieken) where you typing in a very large file? Henning Dieterichs (@hediet) please check this out when you are back
jrieken commentedon Apr 23, 2025
No, I was just typing a comment in a normal file
jrieken commentedon Apr 23, 2025
Just saw this again when typing a line-comment in side
src/vs/workbench/contrib/chat/browser/contrib/chatInputCompletions.tsjrieken commentedon Apr 23, 2025
Managed to debug this. It looks like we keep calling
getPositionOffsetTransformerFromTextModel(as I type) and this function creates the whole string of a text document, loops over that to break it into lines so that it can build a position-to-offset transformation. This is slow and questionable because the text document has these features natively builtin[-]Slow typing (due to `createStateWithAppliedEdit`?)[/-][+]Slow typing due to `getPositionOffsetTransformerFromTextModel`[/+]Fixes #247124
Fixes microsoft#247124
Fixes microsoft#247124