FreeCAD / FreeCAD/Website

Theme: Improve build performance

Open
#26 4 comments 0 reactions 0 assignees View on GitHub
Cleanup/refactor Config Hugo Theme
Dominant language
HTML
Stars
3
Forks
5
Avg merge
2d 7h
Merged PRs (30d)
8

Description

While the current theme code is fairly decent (about 1ms per page on 5K pages and almost 1K processed images, about 5s in total on old laptop CPU), there are many improvements and optimizations possible:

Template:
- Better cache: see [Hugo docs](https://gohugo.io/commands/hugo_build/) for `hugo build --templateMetrics --templateMetricsHints` for templates with many calls
- Reduce nested loops in templates: avoid `O(n²)` complexity
- Reduce expensive calls: site pages or collections traversals, filtering and sorting
- Reduce image and assets pipelines to strictly needed, caching artifacts if reusable between cover, cards, render-hooks

Config:
- Optimize settings and config
- Make better use of [segments](https://gohugo.io/configuration/segments)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.