revanced-manager icon indicating copy to clipboard operation
revanced-manager copied to clipboard

bug: heavy load on api

Open oSumAtrIX opened this issue 3 years ago • 2 comments

Type

Error while running the manager

Bug description

The ReVanced Manager hits the API multiple times when not necessary. Relevant code is used in multiple places: https://github.com/revanced/revanced-manager/blob/f1261398e927903f6c75c44f5d03fdff562bda47/lib/services/revanced_api.dart#L83-L100

Screenshots or videos

All of these call the API each time: image

Solution

Instead of hitting the API multiple times, it is only necessary to do so once and then read the fields from the parsed model.

Additional context

No response

Acknowledgements

  • [X] I have searched the existing issues and this is a new and no duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I filled out all of the requested information in this issue properly.
  • [X] The issue is related solely to the ReVanced Manager

oSumAtrIX avatar Nov 27 '22 00:11 oSumAtrIX

that must be why the app doesn't open if offline, right? and I also wanted to ask if the application can work in the future without any connection, of course, except for updating. Thank you

rootback123 avatar Feb 02 '23 19:02 rootback123

that must be why the app doesn't open if offline, right?

No, that is a separate issue

Ushie avatar Feb 02 '23 21:02 Ushie

Closing as ReVanced API is fine with burst-requests and dio_cache_interceptor is now being used to cache responses anyways

Ushie avatar Aug 25 '23 16:08 Ushie