mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 14:34:47 -04:00
Batch fetch bundled annotations (#14491)
Avoid an n+1 query problem and fetch the bundled aggregations for m.annotation relations in a single query instead of a query per event. This applies similar logic for as was previously done for edits in8b309adb43
(#11660) and threads inb65acead42
(#11752).
This commit is contained in:
parent
da933bfc3f
commit
1799a54a54
5 changed files with 203 additions and 142 deletions
|
@ -503,7 +503,7 @@ def cachedList(
|
|||
is specified as a list that is iterated through to lookup keys in the
|
||||
original cache. A new tuple consisting of the (deduplicated) keys that weren't in
|
||||
the cache gets passed to the original function, which is expected to results
|
||||
in a map of key to value for each passed value. THe new results are stored in the
|
||||
in a map of key to value for each passed value. The new results are stored in the
|
||||
original cache. Note that any missing values are cached as None.
|
||||
|
||||
Args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue