statamic / ssg

The official Statamic Static Site Generator
230 stars 23 forks source link

Shuffle pages #57

Closed jasonvarga closed 3 years ago

jasonvarga commented 3 years ago

In #54 you can split your pages into chunks to be processed concurrently.

If you have a bunch of similar entries that happen to be slow, or a bunch of manual slow routes, they'll all be grouped together. It's possible one worker will get stuck with a bunch of slow pages, and the other workers will be finished.

By shuffling all the pages, it gives you a better chance that the slow routes will be spread across workers, making the site generate faster overall.

Previously we sorted by URL purely to make the console output nicer. It didn't affect the functionality.