integreat-cms icon indicating copy to clipboard operation
integreat-cms copied to clipboard

Link list is loading very slow in regions with a lot of content

Open timobrembeck opened this issue 1 year ago • 2 comments

Describe the Bug

Steps to Reproduce

  1. Go to https://cms-test.integreat-app.de/muenchen/analytics/linkcheck/invalid/
  2. Wait for 20s
  3. See page

Expected Behavior

The linkcheck list should load in a couple of seconds (maybe a maximum of 5s for really large regions?)

Actual Behavior

It's considerably slower

Additional Information

After this is fixed, the linkcheck row can be shown again in the dashboard:

Revert https://github.com/digitalfabrik/integreat-cms/pull/2538/commits/1f9be5876b79710490580d88800e0c3377b688e7

timobrembeck avatar Nov 07 '23 12:11 timobrembeck

I tried to reproduce this by creating one page with ~750 different valid urls and another page with ~750 different invalid urls. Then I made 32 copies of each page.

However, the relevant code of the dashboard ran in about 300-500 ms for me. I also noticed that the example link (https://cms-test.integreat-app.de/muenchen/analytics/linkcheck/invalid/) loads in about 7 seconds, which seems a lot better than 20 seconds. Could it be that this issue has already been fixed?

Otherwise I could imagine that the problem only happens when there are lots of pages that contain different links, but that is hard to test locally.

Apart from that, one simple way to improve the performance for the dashboard would be to specify prefetch_content_objects=False in the call to filter_urls. This roughly halves the time required on my pc.

david-venhoff avatar Jan 08 '24 18:01 david-venhoff

Adding the blocked label because it is hard to reproduce locally without #2516

david-venhoff avatar Feb 13 '24 15:02 david-venhoff

Is this maybe an infrastructure topic/problem as well?

osmers avatar Jun 04 '24 09:06 osmers