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

Two unnecessary API calls hurt performance in WebApp, far worse in Cordova #65

Closed
SailingSteve opened this issue Jun 14, 2018 · 0 comments · Fixed by wevote/WebApp#1572
Assignees

Comments

@SailingSteve
Copy link
Member

SupportActions.positionsCountForAllBallotItems() is called unnecessarily for the same election on the return from Candidate detail page at the cost of 6.2 seconds of wasteful server side processing and a multi second loss of fluidity in Cordova.
VoterGuideActions.voterGuidesToFollowRetrieveByBallotItem() is called unnecessarily for the same voter guide on the entry to the candidate detail page at the cost of a wasteful 38 second server side processing, and an awkward react refresh that hangs the UI for a few seconds.

@SailingSteve SailingSteve self-assigned this Jun 14, 2018
SailingSteve added a commit to SailingSteve/WebApp that referenced this issue Jun 14, 2018
Fixes wevote/WeVoteCordova/issues/65
In Ballot.js, some lint cleanup, and don't call
SupportActions.positionsCountForAllBallotItems if not needed.

In Candidate.js, don't call
VoterGuideActions.voterGuidesToFollowRetrieveByBallotItem for the same
candidate if the associated voter guides are already in cache.

There still is a server side issue with
voterGuidesToFollowRetrieveByBallotItem where we spend almost 45 seconds
processing the response, this fix just has us only call the api when
necessary in this one situation.
SailingSteve added a commit to SailingSteve/WebApp that referenced this issue Jun 14, 2018
Fixes wevote/WeVoteCordova/issues/65
In Ballot.js, some lint cleanup, and don't call
SupportActions.positionsCountForAllBallotItems if not needed.

In Candidate.js, don't call
VoterGuideActions.voterGuidesToFollowRetrieveByBallotItem for the same
candidate if the associated voter guides are already in cache.

There still is a server side issue with
voterGuidesToFollowRetrieveByBallotItem where we spend almost 45 seconds
processing the response, this fix just has us only call the api when
necessary in this one situation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant