-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
Poor auto-complete performance when Drizzle ORM is installed #2232
Comments
TSServer doesn't suffer from this because of caches in some TypeScript internal APIs. So, I changed the label to enhancement. We probably need to use Volar's cache package but there is some issue with the package we need to sort out. |
Thanks for looking into this! I just wanted to clarify the issue isn't just with auto-import, but also with any completion, ie: adding html elements or attributes to elements in the svelte template itself. Here's a video to demonstrate: Screen.Recording.2023-12-21.at.1.45.07.PM.movThis slowdown doesn't happen when editing a javascript/typescript file or a script block within the template. |
It's weird, but auto-import is still triggered in this case. This is because of some limitations we have. Once you have a syntax error in the template, all js completion is global completion. Which includes auto import, but VSCode might filter it out depending on the word before the cursor. You'll have a better experience if you complete the tag and then write the attributes. |
Just installed the update this morning and I have to say, wow, what a difference this makes! This will make building projects in svelte a much better developer experience, thank you! |
Describe the bug
When installing Drizzle ORM and setting up a single table in a brand new SvelteKit project (no other libraries), the language server slows down to the point where it's almost unusable, however only within the svelte template syntax. Intellisense is still instantaneous in
.ts
,.svelte.ts
, and<script lang="ts">
blocks.When setting up a similar example project in Next.js (only using ts-server in the IDE), there are no performance issues.
Reproduction
Editing an
*.svelte
files results in unusable autocomplete with HTML elements, script/style blocks.Autocomplete for typescript in TS files and within script blocks performs as expected.
When I uninstall
drizzle-orm
, the performance issues disappear and autocomplete preforms as expected.Expected behaviour
There should ideally be no extra delay when working within the svelte template syntax
System Info
Which package is the issue about?
I believe it's an issue with the
language-server
?Additional Information, eg. Screenshots
Here's an example repo:
https://github.com/cdebotton/svelte-drizzle-example-language-tools
I've tested this on both an M3 Pro and an M1 Max and found the same results.
The text was updated successfully, but these errors were encountered: