Investigate slowdown of PwaController#manifest
The PwaController#manifest
endpoint is causing slowdowns and sending us over our error budget.
As far as I know, it's only serving a static manifest file that should be heavily cached and the same for every user, so I see no reason why this should be taking so long. Most of the counts are around 5ms but every now and again it jumps up between 5s and 10s. This shouldn't be happening.
This needs investigation. Firstly into what this file does exactly, and secondly into how we can improve it. If my assumptions are correct and this is a static file, then we shouldn't be seeing such long durations for this controller.
@thutterer)
Update after investigation (The manifest.json
file started out as a static json file, but nowadays heavily uses ERB to fill in the manifest's values (like name
and icons
) from the Appearance.current
(ActiveRecord).
The view wasn't cached at all, which can explain why this can get slow under high load.
I opened !126667 (merged) to cache this view based on the current_appearance
(and the view digest itself).
This should fix the slowdowns