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

fix #3586 comments instead of empty text nodes (perf) #3642

Closed

Conversation

neuronetio
Copy link

@neuronetio neuronetio commented Oct 1, 2019

Comment nodes are much faster - no styles, drawing etc...

fix #3586

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR relates to an outstanding issue, so please reference it in your PR, or create an explanatory one for discussion. In many cases features are absent for a reason.
  • This message body should clearly illustrate what problems it solves. If there are related issues, remember to reference them.
  • Ideally, include a test that fails without this PR but passes with it. PRs will only be merged once they pass CI. (Remember to npm run lint!)

Tests

  • Run the tests tests with npm test or yarn test)

@stale
Copy link

stale bot commented Jun 26, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Jun 26, 2021
@stale stale bot removed the stale-bot label Jun 26, 2021
@stale stale bot removed the stale-bot label Jun 27, 2021
@benmccann benmccann added the perf label Jul 14, 2021
@benmccann
Copy link
Member

I think this is a good idea. The vast majority of the comments on the linked issue support this change. The only possible hesitation was that text nodes are less cluttered when you open devtools - though I somewhat think the clutter is a good thin as it makes it clear what Svelte it doing and provides impetus for making it stop creating lots of empty text nodes. In the meantime, this is better performance

@dummdidumm dummdidumm added this to the one day milestone Mar 14, 2023
@dummdidumm
Copy link
Member

I think using comment nodes would spam the browser elements view quite a bit. I feel like we should investigate using fewer of those empty text nodes instead.

@tivac
Copy link
Contributor

tivac commented Mar 15, 2023

I would love to see this change land as part of a dev vs prod style flagging system where the output in prod mode is allowed to be a bit uglier for the sake of speed/size/etc.

@Rich-Harris
Copy link
Member

Closing Svelte 4 PR as stale — thank you

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

Successfully merging this pull request may close these issues.

A lot of empty text nodes - I mean A LOT - performance issue
6 participants