0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-11-14 22:11:47 +01:00
synapse/changelog.d
Erik Johnston 707d5e4e48
Encode JSON responses on a thread in C, mk2 (#10905)
Currently we use `JsonEncoder.iterencode` to write JSON responses, which ensures that we don't block the main reactor thread when encoding huge objects. The downside to this is that `iterencode` falls back to using a pure Python encoder that is *much* less efficient and can easily burn a lot of CPU for huge responses. To fix this, while still ensuring we don't block the reactor loop, we encode the JSON on a threadpool using the standard `JsonEncoder.encode` functions, which is backed by a C library.

Doing so, however, requires `respond_with_json` to have access to the reactor, which it previously didn't. There are two ways of doing this:

1. threading through the reactor object, which is a bit fiddly as e.g. `DirectServeJsonResource` doesn't currently take a reactor, but is exposed to modules and so is a PITA to change; or
2. expose the reactor in `SynapseRequest`, which requires updating a bunch of servlet types.

I went with the latter as that is just a mechanical change, and I think makes sense as a request already has a reactor associated with it (via its http channel).
2021-09-28 09:37:58 +00:00
..
.gitignore
10659.misc GHA: reintroduce an env var for $GITHUB_HEAD_REF (#10659) 2021-09-20 17:35:16 +01:00
10690.bugfix In _purge_history_txn, ensure that txn.fetchall has elements before accessing rows (#10690) 2021-09-24 09:19:51 +00:00
10776.feature Verify ?chunk_id actually corresponds to an insertion event that exists (MSC2716) (#10776) 2021-09-15 09:34:30 +01:00
10777.misc Split out /batch_send meta events to their own fields (MSC2716) (#10777) 2021-09-15 09:30:58 +01:00
10782.bugfix Fix reactivated users not being added to the user directory (#10782) 2021-09-23 12:02:13 +00:00
10785.misc Add missing type hints to non-client REST servlets. (#10817) 2021-09-15 08:45:32 -04:00
10796.misc Always add local users to the user directory (#10796) 2021-09-21 12:02:34 +00:00
10807.bugfix Allow sending a membership event to unban a user (#10807) 2021-09-21 10:23:34 +00:00
10810.bugfix Prevent logging context going missing on federation request timeout (#10810) 2021-09-14 13:01:30 +01:00
10812.misc Use direct references for some configuration variables (part 2) (#10812) 2021-09-15 08:34:52 -04:00
10814.feature Refactor oEmbed previews (#10814) 2021-09-21 16:09:57 +00:00
10815.misc Name the type of token in "Invalid token" messages (#10815) 2021-09-14 11:25:05 +01:00
10816.misc Make StateFilter frozen so we can hash it (#10816) 2021-09-14 16:35:53 +01:00
10817.misc Add missing type hints to non-client REST servlets. (#10817) 2021-09-15 08:45:32 -04:00
10819.feature Include more information in oEmbed previews. (#10819) 2021-09-22 09:45:20 -04:00
10820.misc Treat "\u0000" as "\u0020" for the purposes of message search (message indexing) (#10820) 2021-09-22 08:25:26 -07:00
10823.misc Add type hints to state database module. (#10823) 2021-09-15 09:54:13 -04:00
10826.misc Opt out of cache expiry for get_users_who_share_room_with_user (#10826) 2021-09-22 14:21:58 +01:00
10827.bugfix Fix /initialSync error due to unhashable RoomStreamToken (#10827) 2021-09-22 14:43:26 +01:00
10829.misc Track why we're evicting from caches (#10829) 2021-09-22 10:59:52 +01:00
10831.misc Require type hints in the handlers module. (#10831) 2021-09-20 08:56:23 -04:00
10833.misc Extend ModuleApi with the methods we'll need to reject spam based on …IP - resolves #10832 (#10833) 2021-09-22 13:09:43 +00:00
10834.misc Create a constant for a small png image in tests. (#10834) 2021-09-16 12:01:14 -04:00
10835.misc Test that state events sent by modules correctly end up in the room's state (#10835) 2021-09-21 17:40:20 +02:00
10838.misc Rename MSC2716 things from chunk to batch to match /batch_send endpoint (#10838) 2021-09-21 15:06:28 -05:00
10839.misc Rename /batch_send query parameter from ?prev_event to more obvious usage with ?prev_event_id (MSC2716) (#10839) 2021-09-21 14:10:01 +01:00
10843.bugfix Fix remove_stale_pushers job on SQLite. (#10843) 2021-09-20 10:26:13 +01:00
10845.doc Fix #10837 by adding JSON encoding/decoding to the Module API example… (#10845) 2021-09-17 18:04:37 +01:00
10856.misc Add type hints for event streams. (#10856) 2021-09-21 13:34:26 -04:00
10859.bugfix Allow Synapse Admin API's Room Search to accept non-ASCII characters (#10859) 2021-09-21 08:04:35 -07:00
10865.doc Add documentation for experimental feature flags. (#10865) 2021-09-22 13:41:42 +00:00
10867.misc Add types to http.site (#10867) 2021-09-21 16:41:27 +00:00
10868.feature Add reactor to SynapseRequest and fix up types. (#10868) 2021-09-24 11:01:25 +01:00
10869.doc Clear our destination directories before copying files to GitHub pages. (#10869) 2021-09-21 16:32:46 +00:00
10873.bugfix Ensure we mark sent knocks as outliers (#10873) 2021-09-22 15:20:18 +01:00
10875.bugfix Fix invalidating OTK count cache after claim (#10875) 2021-09-22 15:31:05 +01:00
10879.misc Include outlier status in str(event) for V2/V3 events (#10879) 2021-09-22 12:30:59 +01:00
10880.misc Break down cache expiry reasons in grafana (#10880) 2021-09-23 14:45:32 +01:00
10881.bugfix Fix AuthBlocking check when requester is appservice (#10881) 2021-09-24 10:41:18 +01:00
10883.misc Factor out a separate EventContext.for_outlier (#10883) 2021-09-22 17:58:57 +01:00
10884.misc Factor out _get_remote_auth_chain_for_event from _update_auth_events_and_context_for_auth (#10884) 2021-09-23 17:34:33 +01:00
10885.misc Use direct references for some configuration variables (part 3) (#10885) 2021-09-23 07:13:34 -04:00
10887.bugfix Allow . and ~ chars in registration tokens (#10887) 2021-09-23 17:58:12 +00:00
10889.misc Remove unnecessary parentheses around tuples returned from methods (#10889) 2021-09-23 11:59:07 +01:00
10891.misc Improve typing in user_directory files (#10891) 2021-09-24 10:38:22 +01:00
10893.misc Use direct references for configuration variables (part 4). (#10893) 2021-09-23 12:03:01 -04:00
10896.misc Factor out common code for persisting fetched auth events (#10896) 2021-09-24 11:56:33 +01:00
10897.misc Use direct references for configuration variables (part 5). (#10897) 2021-09-24 07:25:21 -04:00
10898.feature Add a spamchecker callback to allow or deny room creation based on invites (#10898) 2021-09-24 16:38:23 +02:00
10901.misc Simplify _auth_and_persist_fetched_events (#10901) 2021-09-24 11:56:13 +01:00
10905.feature Encode JSON responses on a thread in C, mk2 (#10905) 2021-09-28 09:37:58 +00:00
10906.misc Update postgresql testing script (#10906) 2021-09-24 14:27:09 +00:00
10907.bugfix Stop trying to auth/persist events whose auth events we do not have. (#10907) 2021-09-24 14:01:45 +01:00
10911.bugfix Avoid storing URL cache files in storage providers (#10911) 2021-09-27 12:55:27 +01:00
10913.bugfix Fix race conditions when creating media store and config directories (#10913) 2021-09-27 11:29:23 +01:00
10917.misc Document changes to schema version 61 - 64 (#10917) 2021-09-24 17:09:12 -05:00
10925.misc Sign the git tag in release script (#10925) 2021-09-27 15:39:49 +01:00