Describe the bug
When the profile tooltips are loaded, they cause a lot of requests to the server. This has a couple of problems:
- The throttling limit (
Rack::Attack) is reached very soon as the default configuration allows 100 loads within one minute
- This also causes excess load on the server as a single page view can potentially cause hundreds of server requests per user (serving 100 users would cause 10000 concurrent requests on a proposal page that has 100 comments)
- This also makes development environment feel very slow as each request is causing a lot of excess requests to the server and the development server only serves a limited amount of requests at a time
Typically when this happens, you either see a white page with text "Retry later" (HTTP 429 Too Many Requests).
In case the page itself was within the throttling limit, the avatar images are broken in case the limit is reached right after the initial page load.
To Reproduce
- Go to metadecidim
- Find a proposal/conversation with lots of comments
- Load that page a couple of times
- See the "Retry later" message and expect to wait 1 minute before continuing the use
Expected behavior
I would expect the platform to work in an optimal way and not cause excess load on the server when loading a single page.
The effect is very visible during development when the server is serving a limited amount of requests simultaneously, making development experience really slow.
Screenshots


Stacktrace
No response
Extra data
- Device: (any)
- Device OS: (amy)
- Browser: (any)
- Decidim Version: 0.30.0.rc3
- Decidim installation: metadecidim
Additional context
This behavior was introduced by #13701.
The request originates from:
|
const response = await fetch(node.dataset.tooltipUrl, { |
Even for the same profile, there can be multiple requests made in case that person has contributed multiple times.
The throttling limit is reached very soon with this approach. Raising the throttling limit is also not optimal as it causes a lot more concurrent load on the server, requiring even more resources to run the already extremely heavy application.
Describe the bug
When the profile tooltips are loaded, they cause a lot of requests to the server. This has a couple of problems:
Rack::Attack) is reached very soon as the default configuration allows 100 loads within one minuteTypically when this happens, you either see a white page with text "Retry later" (HTTP 429 Too Many Requests).
In case the page itself was within the throttling limit, the avatar images are broken in case the limit is reached right after the initial page load.
To Reproduce
Expected behavior
I would expect the platform to work in an optimal way and not cause excess load on the server when loading a single page.
The effect is very visible during development when the server is serving a limited amount of requests simultaneously, making development experience really slow.
Screenshots
Stacktrace
No response
Extra data
Additional context
This behavior was introduced by #13701.
The request originates from:
decidim/decidim-core/app/packs/src/decidim/remote_tooltips.js
Line 24 in 5de9881
Even for the same profile, there can be multiple requests made in case that person has contributed multiple times.
The throttling limit is reached very soon with this approach. Raising the throttling limit is also not optimal as it causes a lot more concurrent load on the server, requiring even more resources to run the already extremely heavy application.