question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Having a large amount of divs slows bundling by a lot

See original GitHub issue

example code in my view after I create choo app with create-choo-app module:

  function weeks () {
    var divs = []
    for (var i = 0; i < 4000; i++) {'
      var week = html`<div class= dib w1 bg-yellow">
        ${i}
      </div>`
      divs.push(week)
    }

    return divs
  }

  return html`
    <body class="bg-washed-yellow">
      <div class="ph3 f0">
        ${weeks()}
      </div>
    </body>
  `

this takes several seconds to bundle, completely kills live-reload workflow.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
goto-bus-stopcommented, Jan 11, 2018

8eab621 helps, but not enough!

0reactions
nicknikolovcommented, Apr 5, 2018

I’ve moved on from that project so can’t test currently. So i’m gonna close it, if it comes up again for me i might reopen. Thanks for the help on that issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

how many div's can you have before the dom slows and ...
No answer given here will be right, as it depends upon many factors that are specific to your application. E.g. heavy vs. little...
Read more >
Improving JavaScript Bundle Performance With Code-Splitting
This problem is more apparent on unreliable and slow networks and lower-end devices. In this article, we're going to cover code-splitting best ...
Read more >
Small Bundles, Fast Pages: What To Do With Too Much ...
Large amounts of JavaScript negatively affect site speed in two distinct phases: During page load: big bundles take longer to download. During ...
Read more >
20 Best Practices for Improving JavaScript Performance
Proper JavaScript performance is vital for ensuring that your website loads fast. Check out these 20 best practices for improving JavaScript ...
Read more >
Best practices to increase the speed for Next.js apps
But if you have a large project with lots of different dependencies, it may be difficult to find the unused dependencies.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found