Weeknotes 2024-01-22

career Verb /kəˈri(ə)r/
> careers, plural;
> 1. Move swiftly and in an uncontrolled way in a specified direction
> - the car careered across the road and went through a hedge

Normal work week. Prefetching all the data needed to render a list of posts using Wagtail for django-cast was harder than expected. A lot of streamfield blocks end up making database queries. Template tags like pageurl or slugurl generate database queries. Custom templates overriding some behavior in some django-cast provided template blocks are issuing database queries. But I think I found most of them by now. And there is some good news: Prefetching the data actually improves performance a bit. And without hitting the database, the rendering time is about 3ms per Wagtail page (about 300ms for a feed with 100 posts), which is probably ok.