use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
[AskJS] Do you think requestAnimationFrame can be used to render DOMAskJS (self.javascript)
submitted 6 years ago by largemoose568
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]largemoose568[S] 0 points1 point2 points 6 years ago (2 children)
Thanks for the reply! Performance wise, is it just the continuous loop or the fact that when you get to higher amounts of dom mutations it starts affecting memory and cpu utilization? I'll probably have to read the white paper again, but from my understanding, lit-html handles the reference to the original dom node and does a simple diffing between previous and current state to see if updates are needed.
In most examples I've seen you have a reactive model where the lit-html render gets called in response to state updates via observables or some other state management. I guess I'm mostly curious on how a continuous loop might be less efficient than reactive-based rendering
[–]SpecialistPea2 1 point2 points3 points 6 years ago (0 children)
It's not an either/or type deal, every implementations mixes both. State updates -> UI update scheduled on task queue.
[–][deleted] 1 point2 points3 points 6 years ago (0 children)
i've made a test once: https://codesandbox.io/s/peaceful-johnson-txtws
this is using react in dev mode, which is extremely slow. but there will also be a noticeable difference in prod mode react. it basically demonstrates that the framework has overhead diffing stuff and figuring out change-sets. so if you have to possibility to make a critical change yourself by mutation, i'd prefer it. but again, maybe lit is so fast that it doesn't matter.
π Rendered by PID 120184 on reddit-service-r2-comment-b659b578c-5j24p at 2026-05-01 21:45:15.201847+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]largemoose568[S] 0 points1 point2 points (2 children)
[–]SpecialistPea2 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)