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

api results speed down from 1.5s to 0.4s #4550

Merged
merged 2 commits into from
May 31, 2019
Merged

Conversation

owocki
Copy link
Contributor

@owocki owocki commented May 31, 2019

Description

This PR takes the explorer lazy load time from

kevinowocki@local /Users/kevinowocki/Sites/gitcoin/web~ % time curl "http://localhost:8000/api/v0.1/bounties/?bounty_owner_github_username=owocki&network=mainnet&idx_status=open&order_by=-featuring_date&offset=10&limit=5" > /dev/null
curl  > /dev/null  0.01s user 0.01s system 0% cpu 1.747 total
kevinowocki@local /Users/kevinowocki/Sites/gitcoin/web~ % time curl "http://localhost:8000/api/v0.1/bounties/slim/?bounty_owner_github_username=owocki&network=mainnet&idx_status=open&order_by=-featuring_date&offset=10&limit=5" > /dev/null
curl  > /dev/null  0.01s user 0.01s system 4% cpu 0.459 total

by creating a new route at http://localhost:8000/api/v0.1/bounties/slim/ that loads ONLY what is needed to load the /explorer results in a performant way.

(EDIT - re-added this) note that i had to cut the activities from the response because those were making the results way slow. luckily the activities were not really needed to render the result in the explorer. a further PR down the line could re-enable this by calling an API when the popover is triggered.

Refers/Fixes

#4538
#3628

Testing

Tested locally

@owocki owocki requested review from danlipert and thelostone-mc May 31, 2019 16:27
@codecov
Copy link

codecov bot commented May 31, 2019

Codecov Report

Merging #4550 into stable will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           stable    #4550      +/-   ##
==========================================
+ Coverage   30.12%   30.15%   +0.03%     
==========================================
  Files         210      210              
  Lines       16938    16946       +8     
  Branches     2288     2288              
==========================================
+ Hits         5102     5110       +8     
  Misses      11638    11638              
  Partials      198      198
Impacted Files Coverage Δ
app/dashboard/router.py 32.7% <100%> (+2.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afeee7d...2e71b7f. Read the comment docs.

@owocki
Copy link
Contributor Author

owocki commented May 31, 2019

2e71b7f re-adds activities

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.

1 participant