changed default sort for admin api requests to updated_at desc to improve performance
changed posts fetching/display behavior to accommodate the sorting we used to do on the database
I've pulled the sort from the database query as this triple sort performs very poorly at scale (taking ~4s+ past ~20k posts sometimes). Instead, we now split up the fetch to grab only one status at a time and use the front-end logic to handle displaying scheduled, then drafts, then published. This should result in a much more responsive view.
ref https://linear.app/tryghost/issue/ONC-111
updated_at desc
to improve performanceI've pulled the sort from the database query as this triple sort performs very poorly at scale (taking ~4s+ past ~20k posts sometimes). Instead, we now split up the fetch to grab only one status at a time and use the front-end logic to handle displaying scheduled, then drafts, then published. This should result in a much more responsive view.