Code looks much cleaner and easier to read, as well as being more performant.
Also prevents the construction of invalid xml.
Some benchmarks:
```
❯ hyperfine --runs 3 "uv run build --full "; git checkout master; hyperfine --runs 3 "uv run build --full "
Benchmark 1: uv run build --full
Time (mean ± σ): 287.612 s ± 4.557 s [User: 1613.681 s, System: 151.556 s]
Range (min … max): 283.550 s … 292.539 s 3 runs
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
Benchmark 1: uv run build --full
Time (mean ± σ): 357.248 s ± 5.578 s [User: 2052.506 s, System: 163.057 s]
Range (min … max): 350.810 s … 360.609 s 3 runs
```
So this reduces build times by about a minute, getting us down to just under 5 minutes for a full build on my machine.
Co-authored-by: Darragh Elliott <me@delliott.xyz>
Reviewed-on: #5146
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
phase 1 and 2 now by site folder
This allows for us building each site in a different set of languages, wheres before we built every site in every language any site was in.
At the moment this will build each site in every language that there is at least one file of that language in the site.
So if a site has on file in lang AA, it will be built in lang AA. But if it has no files, it will not be built in that lang.
This is a performance enhancement, will do benchmarks later.
Some more complex heuristics for when we do/do not use a language for a file are being discussed in #4601 .
Co-authored-by: Darragh Elliott <me@delliott.xyz>
Reviewed-on: #5031
Reviewed-by: tobiasd <tobiasd@fsfe.org>
Reviewed-by: Sofía Aritz <sofiaritz@fsfe.org>
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
Another attempt at #4516
Adds a small fix for tag map generation
#4516 introduces build failures, but testing indicates that those failures would have been resolved by a full rebuild.
Hence this pr.
Co-authored-by: Darragh Elliott <me@delliott.xyz>
Reviewed-on: #4553
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
This pr re-formats the build scripts for legibility.
Makes some small tweaks, mainly removing options that don't appear to be used and have no impact.
Updates the help file to be more useful and actually represent all arguments.
Adds the ability to specify languages when building. This is mainly useful for speedups, a full rebuild in just English and French takes only ~3 mins as opposed to 40 for a rebuild of all languages.
There may be some small tweaks not mentioned here, see the commit messages for full details.
This pr does not alter the output of a standard build at all, confirmed using `git diff --no-index`.
Co-authored-by: Darragh Elliott <me@delliott.xyz>
Reviewed-on: #4516
Co-authored-by: delliott <delliott@fsfe.org>
Co-committed-by: delliott <delliott@fsfe.org>
This is slightly more resource intensive per build, but also measn that the bewildering situation of changing files in the source tree alters the build/stage folder output without rebuilding.
Rsync means the impact should not be too large