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.

Delta builds for very large sites

See original GitHub issue

So, as a POC I have successfully built a static site that has ~100k posts using the built in react-static build which is awesome! Takes about ~45 minutes on my personal, run of the mill MacBook. For the record, out of the box both Gatsby and Next.js would blow up with memory issues before the 10k mark so I am super pumped.

At this point I am doing some research into the best way to be able to update any number of posts and only re-build the delta (or the newly published content). This post data would come from an API call in the static.config.js file, probably something like what exists in the examples. Can anyone offer any insight into the best way of building only the new or updated posts, and leaving the rest of the existing site as is? I was thinking I would have to write a custom build / webpack script for this, but wanted to leverage any existing hooks / infrastructure. I am still looking at other static-site-generators for inspiration, but I figured since someone else will inevitably have a similar use case I wanted to ask here.

Thanks!

Matthew

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
tannerlinsleycommented, Oct 17, 2017

That’s great to hear! This is a really cool idea, too. As far as only updating specific posts, that would probably need some tweaking in the architecture. But it could be done. Basically, it would involve a few things:

  • Keeping the dist folder around in your project
  • Not cleaning the dist folder on build
  • A special update CLI command or option in the config
  • A special getRoutesUpdate callback or something similar to fetch the data for the updated posts and return which routes should be updated.

Some other thoughts:

  • The bundle would probably need to be generated again
0reactions
tannerlinsleycommented, Nov 12, 2017

After a lot of discussion on this topic both internally and externally, I think we’ve decided to take the direction of the library towards “fast immutable” builds. Delta builds introduce a few things that are difficult to prepare for:

  • Data dependencies and relationships. Given RS’s data agnostic approach, this would be almost impossible.
  • Server or git related caching mechanisms. This is not RS’s arena or responsibility.

We feel our efforts will be much better invested into producing faster builds for the library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build a high-performance, transactional data lake using open ...
Delta Lake is an open-source project that helps implement modern data lake architectures commonly built on Amazon S3 or HDFS. Delta Lake offers ......
Read more >
TDS Classic Best Practices: Bundle Packages, Delta Builds ...
In order to avoid big deployment times, we recommend using Delta Builds and Delta Packages with TDS Classic - it will lower the...
Read more >
Has anyone used Delta Build Services and/or Build 2 Rent
I'm trying to find a few individuals who have use Delta Build Services, and/or Build 2 rent. I was hoping to get some...
Read more >
Feature Spotlight - Delta Builds - YouTube
Over 70% of the new features in TDS 5.5 are a result of user feedback, and this is one of them! Delta Builds...
Read more >
Building a large delta 3D printer | David Crocker's Solutions blog
In this entry I describe how I built a largish delta printer based on the Kossel design. It started up as an upgrade...
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