Closed clokep closed 1 year ago
(Also I secretly hate cursor_to_dict
because it just hides types.)
Err I'm a bit scared about https://github.com/matrix-org/synapse/pull/16431#discussion_r1347366268 actually
Are there any other uses of cursor_to_dict? Should we mark it as deprecated?
Yes, I plan to poke at more.
Instead of calling
cursor_to_dict
and then immediately unpacking thedict
/ changing the form to something else we should just use the raw tuples returned from the cursor.A smoke test of this reduced my sync (for a rather small account on my test server) from 2757 allocations to 1861. Reducing the total allocated memory by
_wait_for_sync_from_user
from 217.2 KiB to 146.7 KiB.