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

On slow internet, Mark article as read action is blocking UI #702

Closed
Strubbl opened this issue Mar 11, 2018 · 2 comments
Closed

On slow internet, Mark article as read action is blocking UI #702

Strubbl opened this issue Mar 11, 2018 · 2 comments

Comments

@Strubbl
Copy link
Contributor

Strubbl commented Mar 11, 2018

When i am on a real unresponsive, slow internet network connection (2G) and i hit the button to mark an article as read, the UI is frozen until the article is marked as read. In the meantime Android system suggests to wait or close the app. If you wait, some more seconds later the article is marked as read and you can go on using the app.

Is there any improvement in this issue when #621 is implemented?

@Strubbl Strubbl changed the title Mark article as read action is blocking UI On slow internet, Mark article as read action is blocking UI Mar 11, 2018
@di72nn
Copy link
Member

di72nn commented Jul 29, 2018

I can't remember all the details now, but some operations are mutually-exclusive in terms of DB access, so in some cases actions stuck waiting for the previous operation to complete. I think the article lists should load regardless of other operations, but it is the "mark as read" action that is stuck (maybe there is a sync in the background). So the test case should be something like that:

  1. Start sync on a slow network.
  2. Open an article.
  3. Perform some modifying action ("mark as read", "favorite", "delete", etc.).

Result: the UI is stuck. More precisely, the ArticleReadActivity is waiting for the operation from step 3 to complete, the operation is waiting for the sync to complete.

The fix for that is a bit complex. Some long operations should probably be rewritten into a bunch of smaller ones ("article downloading", "queue sync"), some mutual exclusiveness should be checked and maybe eliminated (like "queue sync" should not block adding to local queue).

#621 doesn't touch that.

@di72nn
Copy link
Member

di72nn commented Jul 8, 2020

Fixed in #931.

@di72nn di72nn closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants