Bump batch size from 50 to 1000 for _get_e2e_cross_signing_signatures_for_devices query (#18939)
Co-authored-by: Eric Eastwood <erice@element.io>
This commit is contained in:
1
changelog.d/18939.misc
Normal file
1
changelog.d/18939.misc
Normal file
@@ -0,0 +1 @@
|
||||
Reduce overall number of calls to `_get_e2e_cross_signing_signatures_for_devices` by increasing the batch size of devices the query is called with, reducing DB load.
|
||||
@@ -354,7 +354,10 @@ class EndToEndKeyWorkerStore(EndToEndKeyBackgroundStore, CacheInvalidationWorker
|
||||
if d is not None and d.keys is not None
|
||||
)
|
||||
|
||||
for batch in batch_iter(signature_query, 50):
|
||||
# 1000 is an arbitrary batch size. It helped performance on a very
|
||||
# large-scale deployment (matrix.org), but has not been tested against
|
||||
# any other setup.
|
||||
for batch in batch_iter(signature_query, 1000):
|
||||
cross_sigs_result = (
|
||||
await self._get_e2e_cross_signing_signatures_for_devices(batch)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user