Slow login process #135

Closed
opened 2023-03-25 12:35:26 +00:00 by davidoskky · 1 comment
Contributor

Description

When opening the app, if we previously logged in the application will perform a check while in the login screen.
In particular, it will try to load one item from the feed to make sure that the url provided does in fact host a valid and working selfoss instance.
Doing this increases the loading time of the application by several seconds each time it is opened.

However, this is already checked before logging in the first time. Having some old url in the settings shouldn't be too much of a problem anyways because even providing an invalid url, the home screen opens without any article in it and it is possible to perform a logout.

Moreover, this part of the logic introduces a bug: if we open the application with no internet access, we are logged out from the instance. This practically makes the offline mode unusable.

Solutions

  1. We could strip off all of this check in order to make the app faster to open.
  2. Alternatively, we could simply fix the offline mode bug and leave it as is.

This is the part of the code in question: 629ca01d99/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt (L62)

### Description When opening the app, if we previously logged in the application will perform a check while in the login screen. In particular, it will try to load one item from the feed to make sure that the url provided does in fact host a valid and working selfoss instance. Doing this increases the loading time of the application by several seconds each time it is opened. However, this is already checked before logging in the first time. Having some old url in the settings shouldn't be too much of a problem anyways because even providing an invalid url, the home screen opens without any article in it and it is possible to perform a logout. Moreover, this part of the logic introduces a bug: if we open the application with no internet access, we are logged out from the instance. This practically makes the offline mode unusable. ### Solutions 1. We could strip off all of this check in order to make the app faster to open. 2. Alternatively, we could simply fix the offline mode bug and leave it as is. This is the part of the code in question: https://gitea.amine-louveau.fr/Louvorg/ReaderForSelfoss-multiplatform/src/commit/629ca01d9958ff8bb5ffc1a967c27d20a1f9a59d/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/LoginActivity.kt#L62
Owner

Having some old url in the settings shouldn't be too much of a problem anyways because even providing an invalid url, the home screen opens without any article in it and it is possible to perform a logout.

Nope, this was needed because using a non selfoss url was causing an issue, because it was trying to deserialize things that didn't match the model.

I didn't see the issue reintroduced, so i'll remove it.

> Having some old url in the settings shouldn't be too much of a problem anyways because even providing an invalid url, the home screen opens without any article in it and it is possible to perform a logout. Nope, this was needed because using a non selfoss url was causing an issue, because it was trying to deserialize things that didn't match the model. I didn't see the issue reintroduced, so i'll remove it.
AmineB added this to the Dev project 2023-03-26 18:21:12 +00:00
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#135
No description provided.