r/javascript • • Oct 23 '26

Inline rendering with document​.currentScript

https://leanrada.com/notes/inline-rendering-currentscript/
22 Upvotes

5 comments sorted by

2

u/Disastrous-Town-4820 Oct 23 '26

300% is impressive precision for a benchmark running in the comments

would like to see a trace of both with the same number of instances, then click while they're being created. the bytes went down, sure, but someone still has to build those nodes and it isn't the network

0

u/[deleted] Oct 23 '26

[deleted] — view deleted comment

1

u/RudePhilosopher5721 Oct 23 '26

That’d also add 300% overhead…

If you actually read the article, it’d be more apt to say you might replace it with a custom element of <template></template> instead of their proposed shorthand of $()

That is of course if that weren’t already an element…

1

u/aahmed_8840 11d ago

What baseline and metric does '300% overhead' refer to? Bytes, node count, and runtime tell different stories.

0

u/[deleted] Oct 23 '26

[deleted] — view deleted comment

1

u/RudePhilosopher5721 Oct 27 '26

okay… so you’re saying your comment just sucked then? Got it