there's a really stupid performance regression that's been introduced a couple times when we change around how the bookmarked tag feed is generated where if you don't have any bookmarked tags, the bookmarked tag feed can time out, as opposed to what you'd expect, which is that it loads immediately with "you don't have any bookmarked tags, dumbass"
it's caused by weird behavior with the postgres query planner and i think we've finally killed it once and for all with One Weird Trick: and (select count(*) from bookmarked_tags_cte) > 0 short circuits it immediately. the query planner is smart enough to run this check Once despite it technically being within a loop join, but isn't smart enough to realize that an intersection check against an empty array is going to fail literally every time. computers are dumb sometimes.
also CTEs fucking rule. big fan.
