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

chore: rename internal object properties #9532

Merged
merged 2 commits into from
Nov 18, 2023
Merged

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Nov 18, 2023

This changes all our internal object properties to single characters. This improves code-size, parse time and also improves runtime performance across the board. It just makes the coder harder to read, so I've added comments throughout that labels what they are in most cases. I've likely missed some obvious ones though as there's so many properties going on here.

This saves 0.7kb min+gzip and improves parse time on the default SvelteKit app startup by 4ms!

Copy link

changeset-bot bot commented Nov 18, 2023

🦋 Changeset detected

Latest commit: 7599969

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

This PR includes changesets to release 1 package
Name Type
svelte 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

Copy link

vercel bot commented Nov 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-5-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 18, 2023 7:48pm

chore: rename internal object properties

order properties and add comments

add missing remove_in_transitions
Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sad that this is necessary, but it is

packages/svelte/src/internal/client/types.d.ts Outdated Show resolved Hide resolved
@sisou
Copy link

sisou commented Nov 19, 2023

Sad that this is necessary, but it is

Is it? For 4ms? And 0.7kb? I don't think it is. Svelte 5 is in JS instead of TS so jump-to-definition makes sense. For the developer experience. This undoes that, no?

@trueadm
Copy link
Contributor Author

trueadm commented Nov 19, 2023

@sisou Those are pretty big figures for a hello world SvelteKit app that starts at 9kb.

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

Successfully merging this pull request may close these issues.

None yet

3 participants