From 953bdddd53b71359f1fc67b34a6bc0729de8121b Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 30 Dec 2018 12:31:30 -0500 Subject: [PATCH] link to a relevant tweet in virtual DOM post --- site/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md b/site/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md index df538136ff..062745b192 100644 --- a/site/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md +++ b/site/content/blog/2018-12-27-virtual-dom-is-pure-overhead.md @@ -136,6 +136,8 @@ function MoreRealisticComponent(props) { Here, we're generating a new array of virtual `
  • ` elements — each with their own inline event handler — on every state change, regardless of whether `props.items` has changed. Unless you're unhealthily obsessed with performance, you're not going to optimise that. There's no point. It's plenty fast enough. But you know what would be even faster? *Not doing that.* + + The danger of defaulting to doing unnecessary work, even if that work is trivial, is that your app will eventually succumb to 'death by a thousand cuts' with no clear bottleneck to aim at once it's time to optimise. Svelte is explicitly designed to prevent you from ending up in that situation.