Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thousands of REST requests on reload #25705

Closed
richvdh opened this issue Jul 3, 2023 · 3 comments
Closed

Thousands of REST requests on reload #25705

richvdh opened this issue Jul 3, 2023 · 3 comments
Labels

Comments

@richvdh
Copy link
Member

richvdh commented Jul 3, 2023

Steps to reproduce

  1. Be logged into my account
  2. Ctrl-R

Outcome

What did you expect?

Normality

What happened instead?

image

Operating system

Ubuntu 22.04

Application version

Element version: 7164aeb-react-90b572f07413-js-3a694f499841 Olm version: 3.2.14

How did you install the app?

develop.element.io

Homeserver

synapse 1.83.0

Will you send logs?

No

@richvdh
Copy link
Member Author

richvdh commented Jul 3, 2023

Looking at the HAR, some particularly egregious examples:

    297 GET https://matrix.sw1v.org/_matrix/client/r0/rooms/!ZKwMrTfYLckrZBadAb%3Amatrix.org/event/%24SPP6iXpWK7ak_Crg4JYqlFwfM4Taj9a-97-alR50wT0
    149 GET https://matrix.sw1v.org/_matrix/client/v1/rooms/!ZKwMrTfYLckrZBadAb%3Amatrix.org/relations/%24UCZ8ueiXAV08RV3xi5cR-k14Xzb_gt7AFfgkbHlC5AY/m.replace/m.room.encrypted?limit=1
    149 GET https://matrix.sw1v.org/_matrix/client/r0/rooms/!ZKwMrTfYLckrZBadAb%3Amatrix.org/event/%24UCZ8ueiXAV08RV3xi5cR-k14Xzb_gt7AFfgkbHlC5AY
    148 GET https://matrix.sw1v.org/_matrix/client/v1/rooms/!ZKwMrTfYLckrZBadAb%3Amatrix.org/relations/%24SPP6iXpWK7ak_Crg4JYqlFwfM4Taj9a-97-alR50wT0/m.replace/m.room.encrypted?limit=1

(The first column is number of requests. In practice, the number of requests is doubled because each gets a CORS preflight.)

  • !ZKwMrTfYLckrZBadAb:matrix.org/ $SPP6iXpWK7ak_Crg4JYqlFwfM4Taj9a-97-alR50wT0 is the start of a fairly long thread, but I don't think that's any reason we need to ask for the the event itself 297 times and its relations 148 times.
  • !ZKwMrTfYLckrZBadAb:matrix.org/ $UCZ8ueiXAV08RV3xi5cR-k14Xzb_gt7AFfgkbHlC5AY is the other end of the same thread.

In total, there are 1068 GET /_matrix/client/r0/rooms/[^/]*/event/ requests, and 738 /_matrix/client/v1/rooms/[^/]*/relations/ requests.

@kerryarchibald
Copy link
Contributor

Duplicate of #25395?

@richvdh
Copy link
Member Author

richvdh commented Jul 3, 2023

yes indeed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants