Update filter to be more precise and avoid more work

- Added `room.account_data` and `room.presence` to avoid extra work in `_generate_sync_entry_for_rooms()`
 - Added a comment to the top-level `account_data` and `presence` filters that `(This is just here for good measure)`

See https://github.com/element-hq/synapse/pull/17167#discussion_r1610517164
This commit is contained in:
Eric Eastwood 2024-05-22 14:07:35 -05:00
parent 514aba5810
commit 97497955ea

View file

@ -638,14 +638,26 @@ class SlidingSyncE2eeRestServlet(RestServlet):
"state": { "state": {
"types": ["m.room.member"], "types": ["m.room.member"],
}, },
# We don't want any extra account_data generated because it's not
# returned by this endpoint. This helps us avoid work in
# `_generate_sync_entry_for_rooms()`
"account_data": {
"not_types": ["*"],
},
# We don't want any extra ephemeral data generated because it's not
# returned by this endpoint. This helps us avoid work in
# `_generate_sync_entry_for_rooms()`
"ephemeral": {
"not_types": ["*"],
},
}, },
# We don't want any extra account_data generated because it's not # We don't want any extra account_data generated because it's not
# returned by this endpoint # returned by this endpoint. (This is just here for good measure)
"account_data": { "account_data": {
"not_types": ["*"], "not_types": ["*"],
}, },
# We don't want any extra presence data generated because it's not # We don't want any extra presence data generated because it's not
# returned by this endpoint # returned by this endpoint. (This is just here for good measure)
"presence": { "presence": {
"not_types": ["*"], "not_types": ["*"],
}, },