Semantic tokens are causing a large changed range onTokensChanged event to fire
I was working on https://github.com/microsoft/vscode/issues/227107 which involves listening to various view events and updating a cache. But I'm running into this problem where I want to clear all lines when new tokens come in, but it seems that a large range is being fired as changed when scrolling stops.
Here are a few logs that show that when scrolling only a single write occurs (the new line), 1 for each of the 2 mirrored buffers sent to the GPU. But when I stop scrolling I need to clear 33 lines from the cache (approximately the height of the viewport):
This is where the event originates after scrolling stops:
Would it be possible to tighten this to only fire for the ranges that actually change? AFAICT it's not changing any tokens.