FAForever / faf-moderator-client

FAF Moderator Client
MIT License
4 stars 11 forks source link

Speeding Up Reports Loading: Using Threading for Faster Batch Requests #204

Closed magge-faf closed 4 months ago

magge-faf commented 4 months ago

Issue:

The reports get requested one by one from the server, which will take minutes until we get any reports shown in Mordor.

Possible Solution:

Speed things up via threading to simultaneously load and populate the reports in small batches

Brutus5000 commented 4 months ago

Please point me to the code where it is listed or by one. Here we load a whole list in one request: https://github.com/FAForever/faf-moderator-client/blob/51d8d52cf86c54eec852ad82b24e4d40e0379280/src/main/java/com/faforever/moderatorclient/api/domain/ModerationReportService.java#L32

magge-faf commented 4 months ago

Some time ago ~6 months, the reports always took several minutes until all showed up. That was the reason Spikey84 implemented threading loading for his own modified client, which speed things up tremendously, and I simply merged his commit with my modified Mordor client.

After testing the current official Mordor version right now, the loading of all report has taken only 18 seconds. I am grateful the loading issue was already resolved. I thought all the time that the official Mordor version was still behind on the loading process.

Thanks for your comment, which has saved me the time to prepare the PR. I will close the issue, because it does not exist anymore.

Brutus5000 commented 4 months ago

18 seconds is still surprisingly long though

Sheikah45 commented 4 months ago

I believe the 18 seconds is because we load them all at once and then create the fx components for them right away as well.