language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

[perf]: only create objects for completion items for svelte syntax once

Open MathiasWP opened this issue 1 month ago • 1 comments

Re-creating these objects every time getCompletionsWithRegardToTriggerCharacter is called is unnecessary. Only creating them once should free up a small bit of memory.

MathiasWP avatar Dec 06 '25 17:12 MathiasWP

🦋 Changeset detected

Latest commit: 73cb6a9da79b95492ce6134de78954f77e0238a5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte-language-server Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Dec 06 '25 17:12 changeset-bot[bot]

I don't see any reason why we would need to do this dynamically, so this change is moving in a sensible direction. Not much gained from the change though. Plus it feels odd to have these features just inlined here and not imported from some centralized language feature metadata location or something, but that's a larger and separate discussion.

aewing avatar Dec 19 '25 22:12 aewing