Too may api calls at startup #63
Closed
opened 2022-09-24 15:29:33 +00:00 by davidoskky
·
3 comments
enhancement/too-many-calls
v125051211
v125040991
v125030901
v125030711
v125030681
v125020581
v125020471
v125020411
v125010291
v125010241
v125010201
v125010131
v125010111
v125010031
v124123651
v124123641
v124123421
v124113311
v124113301
v124113252
v124113251
v124041081
v124030731
v124020451
v124010301
v124010191
v124010032
v124010031
v123113311
v123102961
v123102852
v123102851
v123102841
v123061811
v123061651
v123051471
v123051331
v123051321
v123051301
v123051211
v123041021
v123030851
v123030751
v123030681
v123030621
v123020572
v123020571
v123020523
v123020522
v123020521
v123020511
v123020491
v123010301
v123010281
v123010261
v123010241
v123010041
v122123641
v122123631
v122123621
v122123611
v122123602
v122123601
v122123571
v122123532
v122123531
v122123522
v122123521
v122123483
v122123482
v122123481
v122123461
v122123431
v122123421
v122123391
v122123381
v122123371
v122123351
v122113181
v122113172
v122113171
v122113161
v122113131
v122113101
v122102881
v122092701
v122092691
v122092671
v122092572
v122092561
Labels
Clear labels
Difficulty - Beginner friendly
Difficulty = Easy
Difficulty = Hard
Difficulty = Medium
Priority = CRITICAL
Priority = High
Priority = Low
Priority = Normal
Priority = Some day
Status - Fixed somewhere else
Status - No details provided
Status = Can't fix
Status = Duplicate
Status = Help wanted
Status = Invalid
Status = Need more details
Status = Taken
Status = Wontfix
Type - Selfoss works like this
Type = Bug
Type = Chore
Type = Enhancement
Type = Feature
Type = Question
Type = SELFOSS API ISSUE
Type = Tools
Type = UX/Design
Up For Grabs
No labels
Type = Enhancement
Milestone
No items
No Milestone
A little better
Assignees
AmineB (Amine Bouabdallaoui)
Clear assignees
No Assignees
AmineB
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Louvorg/ReaderForSelfoss-multiplatform#63
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.
@davidoskky can you please try the
enhancement/too-many-callsbranch ?I didn't see a lot of improvement compared to the android version.
Retrofit seems to be super fast compared to ktor.
Also, note that the default article to fetch was 200. I changed it to 20, and things are quicker.
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.