[FastAPI] Improve package search results voted/notify performance
Currently, for each package, we are performing a separate query to determine if it has been voted on or if it has notifications for a particular user.
This is bad. If we have 200 results, this will force the request to perform 200 * single queries.
We should organize notify/vote state better when rendering templates. Perhaps query for the record sets all at once and store them in a separate list or so.
In any case, this needs to be improved. With FastAPI, we're creaming PHP across the board in terms of performance with the exception of this case.
This can currently be seen on a Dashboard page.