Too may api calls at startup #63

Closed
opened 2022-09-24 15:29:33 +00:00 by davidoskky · 3 comments
Contributor

As I said in #59 the application appears to make too many api calls.
I tested this on the latest commit (da71de6806)

When starting up the application, 5 api calls to /items are made.
The first 3 are made with the parameter unread and the other two with the parameters all and starred.
I'll point out that all offline settings are disabled, thus no call should be made for all or starred.

After the first three calls to unread the list of articles loads up in the application, the other two calls are made after the application correctly loaded the articles and shows them.

This might be the reason why the new application feels slower to start up compared to the old one.

Ideally, only one api call to unread should be performed at startup.

As I said in #59 the application appears to make too many api calls. I tested this on the latest commit (da71de6806b547c7593e5bb89dd8207bfac87853) When starting up the application, 5 api calls to /items are made. The first 3 are made with the parameter unread and the other two with the parameters all and starred. I'll point out that all offline settings are disabled, thus no call should be made for all or starred. After the first three calls to unread the list of articles loads up in the application, the other two calls are made after the application correctly loaded the articles and shows them. This might be the reason why the new application feels slower to start up compared to the old one. Ideally, only one api call to unread should be performed at startup.
AmineB added the
Type = Enhancement
label 2022-09-26 11:25:34 +00:00
AmineB added this to the A little better milestone 2022-09-26 11:25:38 +00:00
AmineB added this to the Dev project 2022-09-26 11:25:40 +00:00
AmineB self-assigned this 2022-09-26 11:25:43 +00:00
AmineB added reference enhancement/too-many-calls 2022-09-26 14:16:59 +00:00
Owner

@davidoskky can you please try the enhancement/too-many-calls branch ?

I didn't see a lot of improvement compared to the android version.

Retrofit seems to be super fast compared to ktor.

@davidoskky can you please try the ` enhancement/too-many-calls ` branch ? I didn't see a lot of improvement compared to the android version. Retrofit seems to be super fast compared to ktor.
Owner

Also, note that the default article to fetch was 200. I changed it to 20, and things are quicker.

Also, note that the default article to fetch was 200. I changed it to 20, and things are quicker.
Author
Contributor

Yes, in your branch it is working correctly and only one call is made at startup.
It does feel a little bit quicker, but that's probably due to the number of fetched articles.
I'm not testing the loading time extensively since I'm not sure how I would go about doing that reliably.

Yes, in your branch it is working correctly and only one call is made at startup. It does feel a little bit quicker, but that's probably due to the number of fetched articles. I'm not testing the loading time extensively since I'm not sure how I would go about doing that reliably.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Louvorg/ReaderForSelfoss-multiplatform#63
No description provided.