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

Performance fix in frontend for slow loading in mongodb #49

Merged
merged 7 commits into from
May 15, 2019

Conversation

terrylks
Copy link
Contributor

Fix polling behaviour on block-list, transaction-list page, headblock and lastblockinfo and fetching behaviour on all rpc api calls to reduce the hit rate of the api calls.

  • For block-list and transaction-list page,
  • Only show error if that is the first call with error after component is loaded. Otherwise, show previous result and reload the api call in background ( like caching )
  • Only fire api call after the previous call has settled ( fulfilled / rejected / cancelled ) while in polling
  • Fix the meaning of flag is fetching and let it be the indicator as the flag of settled api call
  • Refactor apiRpc object as an observable with adding a timeout feature.
  • Increase api call timeout from 2500 to 5000 milliseconds to reduce calls retry rate when polling.
  • Extract time intervals as env config

terrylks added 6 commits May 14, 2019 16:31
Dispatch fetchStart right before calling the api.
Add fetchEnd when the interval end.
Add isPolling reducer for replacing isFetching in UI loading.
Do not show errors when it is auto Reloading for repoll.
…e we want to show error immediately if the fetch is rejected / without.
… env config.

Change timeout time to 2500 to 5000 for reducing retry rate.
@terrylks terrylks added bug Something isn't working enhancement New feature or request labels May 14, 2019
Copy link
Contributor

@mjk90 mjk90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me. Tested on my machine and they seem to have solved some of the issues/bugs I've noticed with the list pages.
The only thing I noticed is that 'lastblockinfo.js' has an unused import of 'timeout'. Other than that, it all looks good 👍

@terrylks terrylks merged commit a6952e5 into develop May 15, 2019
@terrylks terrylks deleted the fetchstart-fix branch May 15, 2019 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants