Reduce size of joined_user cache
The _get_joined_users_from_context cache stores a mapping from user_id to avatar_url and display_name. Instead of storing those in a dict, store them in a namedtuple as that uses much less memory. We also try converting the string to ascii to further reduce the size.
Showing
- synapse/push/bulk_push_rule_evaluator.py 5 additions, 2 deletionssynapse/push/bulk_push_rule_evaluator.py
- synapse/rest/client/v1/room.py 7 additions, 1 deletionsynapse/rest/client/v1/room.py
- synapse/storage/roommember.py 14 additions, 8 deletionssynapse/storage/roommember.py
- synapse/util/stringutils.py 14 additions, 0 deletionssynapse/util/stringutils.py
Loading
Please register or sign in to comment