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

[politeia] Improve async proposal fetching #1825

Merged
merged 4 commits into from Nov 23, 2018

Conversation

matheusd
Copy link
Member

Improve #1796

This changes the following to try and improve general responsiveness of proposal listing:

  • The big loading logo is only displayed during the very first proposal fetching (when the proposal list is empty)
  • Vote results aren't fetched per proposal on the first load anymore (that info can be obtained by the initial votesResult call)
  • The /votes api call performed during proposal listing is performed asynchronously at once for all proposals, instead of being issued with a await call per proposal (so all proposal votes can be gathered at once)
  • The proposal lists are displayed even while the vote data hasn't finished loading yet, so the user can navigate through them sooner
  • Further loads (after the first one) don't trigger the display of the big loading icon anymore (the new proposal data will simply override the old one once all relevant calls have completed)

While this doesn't actually address caching of proposal data per se, it should significantly improve the ux. We can iterate on further changes after a new round of tests.

@alexlyp alexlyp merged commit 797e923 into decred:master Nov 23, 2018
@matheusd matheusd deleted the pi-fetching-improvements branch November 26, 2018 09:51
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

Successfully merging this pull request may close these issues.

None yet

2 participants