aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/models
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2024-04-01 20:08:02 +0200
committerGravatar Johannes Christ <[email protected]>2024-04-01 20:21:49 +0200
commit084b52b1c5f7cf9e02c64361972b75b19bc1a8dc (patch)
tree84fb250db8e44bcb396a2bf0ed033cd5d97fe5ec /pydis_site/apps/content/models
parentMerge pull request #1286 from python-discord/jb3/filterlist-perf-improvements (diff)
Upsert tags in two queries
Before, we had an N+1 query, where each tag would be separately fetched and updated. Instead, first delete any tags we no longer care about, then perform an upsert of all fields except for `last_commit`, which we want to keep from the existing tag. This comes with one caveat: on the first update of the tags, the `tags` list is no longer modified in-place, because mutation is bad, however, the database state is updated accordingly.
Diffstat (limited to 'pydis_site/apps/content/models')
0 files changed, 0 insertions, 0 deletions