(Searched forums and website github but didn’t see any performance threads so starting new one)
I’ve been reading a lot of documentation lately as I continue to explore caddy and one frustrating thing which stands out to me is how slow the documentation loads.
This is especially felt when reading through multiple layers of documentation all at once since one experiences the slowness at every layer of json.
I finally am posting this after a particuarly bad experience with the following url:
JSON Config Structure - Caddy Documentation which took 18s average over three loads (that I recorded).
(That’s actually just the load of the critical path bottleneck: https://caddyserver.com/api/docs/config/apps/http/servers/routes/handle/auth_portal/ but the rest of the site is pretty fast)
I wonder if there aren’t any opportunities to improve things here:
- Even though the content is fairly static there is no caching at all of the documentation pages which means even repeated refreshes take the same amount of time.
- Until the docs load there is no indication that anything is happening or I should be waiting.
- Instead, there’s an warning box for
This module does not come with Caddy.except none of the placeholders are filled in (and it also shows up for built in modules…). Even after knowing about the loading times my first reaction is to think that the documentation doesn’t exist for slow pages after waiting 10 or more seconds!
If the underlying speed can’t be solved maybe at least some caching or UI affordance for the loading state could be added. (And to be fair the higher level
http module (JSON Config Structure - Caddy Documentation) only takes around ~6s to load so it seems to be a resource dependant cost)