Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce amount of api calls. #207

Open
Diyou opened this issue Jul 31, 2022 · 2 comments
Open

Reduce amount of api calls. #207

Diyou opened this issue Jul 31, 2022 · 2 comments

Comments

@Diyou
Copy link
Contributor

Diyou commented Jul 31, 2022

As a follow up of #205 :

In a workflow which looked like:

Updater updater("foo");
updater.describeAppImage();
updater.checkForChanges();
updater.start();
updateInformation->buildUrl

Will be called 5 times which will always return the same string I suppose.

@Diyou
Copy link
Contributor Author

Diyou commented Jul 31, 2022

Semantically I think that there should not be any reason for describeAppImage to fetch any data at all to be congruent with an offline context.

@TheAssassin
Copy link
Member

Semantically I think that there should not be any reason for describeAppImage to fetch any data at all to be congruent with an offline context.

This method is not supposed to be used in an offline context, though. It never has been. It's also not needed for regular API use.

The API may not be the most efficient (and lazy-initializing/caching data is tricky), it could certainly do better. Please don't hesitate to send pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants