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

Scrolling freezes even with no highlighting enabled. #1

Open
mldisibio opened this issue Aug 15, 2024 · 3 comments
Open

Scrolling freezes even with no highlighting enabled. #1

mldisibio opened this issue Aug 15, 2024 · 3 comments

Comments

@mldisibio
Copy link

This is an incredibly useful extension. However, it does noticeably affect scrolling files with lengthy sql literals (e.g. a stored procedure with 250 lines) when the extension is enabled, even if there are no directives in the file itself to enable the highlighting.
Scrolling will freeze for a noticeable second or two. It affects both scrolling with the cursor as well as mouse and scrollbar.

Visual Studio 2022
Dell Precision 7540 with 6 cores and 64 Gb memory.

When I disable the extension, scrolling is normal and smooth.

@JakubJanowski
Copy link
Owner

Thanks for reporting the issue. Would you mind sharing an example?

The extension does still have to scan a file to search for any potential directives that enable highlighting but the impact should be minimal and only run when the file content updates.

I tried reproducing this but the scroll freeze is not that pronounced for me on a much weaker laptop with a ~1k line stored procedure string literal. I can notice maybe 100-200ms delay sometimes but it is not consistent and only when dragging a scrollbar. Maybe it has to do more with complexity of the code.

@mldisibio
Copy link
Author

Thanks for looking into it. I've added you to a repo with some examples where it hangs, and one file that does not hang too much. Explanations in the readme.

If the examples don't make your scrollbar hang, then it's probably something with my VS configuration and we'll just leave it at that.

@JakubJanowski
Copy link
Owner

Thanks for the example! It hangs for me as well and I noticed it has to do with interpolated string literals. When I remove the dollar from the start then it scrolls smoothly. I'll see what I can do to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants