dendrite/federationapi/routing
Till 8e4dc6b4ae
Optimize PrevEventIDs when getting thousands of backwards extremeties (#3308)
Changes how many `PrevEventIDs` we send to other servers when
backfilling, capped to 100 events.

Unsure about how representative this benchmark is..
```
goos: linux
goarch: amd64
pkg: github.com/matrix-org/dendrite/roomserver/api
cpu: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
                            │    old.txt     │               new.txt               │
                            │     sec/op     │   sec/op     vs base                │
PrevEventIDs/Original1-8         264.9n ± 5%   237.4n ± 7%  -10.36% (p=0.000 n=10)
PrevEventIDs/Original10-8        3.101µ ± 4%   1.590µ ± 2%  -48.72% (p=0.000 n=10)
PrevEventIDs/Original100-8       44.32µ ± 2%   12.80µ ± 4%  -71.11% (p=0.000 n=10)
PrevEventIDs/Original500-8     263.835µ ± 4%   7.907µ ± 4%  -97.00% (p=0.000 n=10)
PrevEventIDs/Original1000-8    578.798µ ± 2%   7.620µ ± 2%  -98.68% (p=0.000 n=10)
PrevEventIDs/Original2000-8   1272.039µ ± 2%   8.241µ ± 9%  -99.35% (p=0.000 n=10)
geomean                          43.81µ        3.659µ       -91.65%

                            │    old.txt     │               new.txt                │
                            │      B/op      │     B/op      vs base                │
PrevEventIDs/Original1-8          72.00 ± 0%     48.00 ± 0%  -33.33% (p=0.000 n=10)
PrevEventIDs/Original10-8        1512.0 ± 0%     500.0 ± 0%  -66.93% (p=0.000 n=10)
PrevEventIDs/Original100-8     11.977Ki ± 0%   7.023Ki ± 0%  -41.36% (p=0.000 n=10)
PrevEventIDs/Original500-8     67.227Ki ± 0%   7.023Ki ± 0%  -89.55% (p=0.000 n=10)
PrevEventIDs/Original1000-8   163.227Ki ± 0%   7.023Ki ± 0%  -95.70% (p=0.000 n=10)
PrevEventIDs/Original2000-8   347.227Ki ± 0%   7.023Ki ± 0%  -97.98% (p=0.000 n=10)
geomean                         12.96Ki        1.954Ki       -84.92%

                            │   old.txt   │              new.txt               │
                            │  allocs/op  │ allocs/op   vs base                │
PrevEventIDs/Original1-8       2.000 ± 0%   1.000 ± 0%  -50.00% (p=0.000 n=10)
PrevEventIDs/Original10-8      6.000 ± 0%   2.000 ± 0%  -66.67% (p=0.000 n=10)
PrevEventIDs/Original100-8     9.000 ± 0%   3.000 ± 0%  -66.67% (p=0.000 n=10)
PrevEventIDs/Original500-8    12.000 ± 0%   3.000 ± 0%  -75.00% (p=0.000 n=10)
PrevEventIDs/Original1000-8   14.000 ± 0%   3.000 ± 0%  -78.57% (p=0.000 n=10)
PrevEventIDs/Original2000-8   16.000 ± 0%   3.000 ± 0%  -81.25% (p=0.000 n=10)
geomean                        8.137        2.335       -71.31%
```
2024-01-20 22:26:57 +01:00
..
backfill.go Optimize PrevEventIDs when getting thousands of backwards extremeties (#3308) 2024-01-20 22:26:57 +01:00
devices.go Move MakeJoin logic to GMSL (#3081) 2023-05-17 00:33:27 +00:00
eventauth.go Update gmsl to use new validated RoomID on PDUs (#3200) 2023-09-15 14:39:06 +00:00
events.go Update gmsl to use new validated RoomID on PDUs (#3200) 2023-09-15 14:39:06 +00:00
invite.go Add pseudoID compatibility to Invites (#3126) 2023-07-06 15:15:24 +00:00
join.go Use *spec.SenderID for QuerySenderIDForUser (#3164) 2023-08-02 11:12:14 +01:00
keys.go Fix notary keys requests for all keys (#3296) 2024-01-08 19:14:29 +01:00
leave.go Update gmsl to use new validated RoomID on PDUs (#3200) 2023-09-15 14:39:06 +00:00
missingevents.go Update gmsl to use new validated RoomID on PDUs (#3200) 2023-09-15 14:39:06 +00:00
openid.go Move json errors over to gmsl (#3080) 2023-05-09 22:46:49 +00:00
peek.go Move MakeJoin logic to GMSL (#3081) 2023-05-17 00:33:27 +00:00
profile.go Don't HTTP500 if a profile does't exist 2023-07-14 14:24:31 +02:00
profile_test.go Use IsBlacklistedOrBackingOff to determine if we should try to fetch devices (#3254) 2023-11-09 08:43:27 +01:00
publicrooms.go Move MakeJoin logic to GMSL (#3081) 2023-05-17 00:33:27 +00:00
query.go de-MSC-ifying space summaries (MSC2946) (#3134) 2023-07-20 15:06:05 +01:00
query_test.go Use IsBlacklistedOrBackingOff to determine if we should try to fetch devices (#3254) 2023-11-09 08:43:27 +01:00
routing.go de-MSC-ifying space summaries (MSC2946) (#3134) 2023-07-20 15:06:05 +01:00
send.go Make StrictValidityChecking a function (#3092) 2023-06-06 15:16:55 +02:00
send_test.go Use IsBlacklistedOrBackingOff to determine if we should try to fetch devices (#3254) 2023-11-09 08:43:27 +01:00
state.go Update gmsl to use new validated RoomID on PDUs (#3200) 2023-09-15 14:39:06 +00:00
threepid.go Merge SenderID & Per Room User Key work (#3109) 2023-06-14 14:23:46 +00:00
version.go Version imprint (#1383) 2020-09-02 16:18:08 +01:00