Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic tokens are causing a large changed range onTokensChanged event to fire #233942

Open
Tyriar opened this issue Nov 15, 2024 · 0 comments
Open
Assignees
Labels
feature-request Request for new features or functionality semantic-tokens Semantic tokens issues
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Nov 15, 2024

I was working on #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):

Image

This is where the event originates after scrolling stops:

Image

Image

Would it be possible to tighten this to only fire for the ranges that actually change? AFAICT it's not changing any tokens.

@Tyriar Tyriar added this to the Backlog milestone Nov 15, 2024
@Tyriar Tyriar changed the title Semantic tokens are causing a large range to fire Semantic tokens are causing a large changed range onTokensChanged event to fire Nov 15, 2024
@hediet hediet assigned alexdima and unassigned hediet Dec 9, 2024
@rebornix rebornix added the semantic-tokens Semantic tokens issues label Dec 18, 2024
@Yoyokrazy Yoyokrazy added the feature-request Request for new features or functionality label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality semantic-tokens Semantic tokens issues
Projects
Status: Blocked
Development

No branches or pull requests

5 participants