buttondown / roadmap

Buttondown's public roadmap
53 stars 0 forks source link

search lag/endless lopping #3562

Open Ben-EvergreenS opened 1 month ago

Ben-EvergreenS commented 1 month ago

link to ticket

Similar to closed issue #3383 . When searching for email or subscriber either the search loops endlessly or lags significantly. Haven't been able to confirm this so far with other accounts.

jmduke commented 1 month ago

This is due to the historical_emails leg of searching. I think we're missing an index, though longer term we probably need some cogent strategy beyond naively querying that collection.

jmduke commented 1 month ago

Some basic profiling reveals that the expensive leg is actually vectorizing the body, which makes sense. We should start using a GeneratedField instead (https://docs.djangoproject.com/en/5.1/ref/models/fields/#django.db.models.GeneratedField) which means bumping to Django 5.