mlemgroup / mlem

Mlem for Lemmy
https://lemmy.ml/c/mlemapp
GNU General Public License v3.0
180 stars 31 forks source link

Duplicate network calls on app start #664

Closed mormaer closed 4 weeks ago

mormaer commented 1 year ago

Describe the bug When the application starts duplicate network calls are made as the views render/redraw.

Expected Behavior The networking should be limited to that which is required, and where necessary group duplicate requests.

Actual Behavior Multiple calls occur simultaneously

To Reproduce

VIDEO

Mlem Information: latest dev build, but has been present for some time.

Additional Context The fix I have in progress for #651 makes use of an actor during resolution, I will look to use a similar approach to add support for grouped network calls which will address this issue. We should also be looking to have calls separated from the lifetime of our views, however our client should handle this situation gracefully even when it is spammed with requests.

boscojwho commented 1 year ago

I'm not sure if this is intentional behaviour, but this issue is partly caused by our TabView loading all the tab verticals on launch, instead of lazy loading each tab view. The system TabView lazy loads tabs.

EricBAndrews commented 4 weeks ago

Stale, v1