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

improves profile speed by moving the activity tab into lazy load #4760

Merged
merged 3 commits into from Jul 11, 2019

Conversation

owocki
Copy link
Contributor

@owocki owocki commented Jul 9, 2019

Description

improves profile speed by moving the activity tab into lazy load

this is driven by an analysis on my local that shows that for profile/owocki , the activity tab is the slowest thing to load on the page (currently takes 5s to load, 2.2s is from activity tab)

Refers/Fixes

#4620

Testing

tested locally

with a warmed cache:

BEFORE THIS CHANGE:

kevinowocki@local /Users/kevinowocki/Sites/gitcoin/web~ % time curl "http://localhost:8000/profile/owocki" > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  122k  100  122k    0     0   100k      0  0:00:01  0:00:01 --:--:--  100k
curl "http://localhost:8000/profile/owocki" > /dev/null  0.01s user 0.01s system 1% cpu 1.242 total

AFTER THIS CHANGE:

kevinowocki@local /Users/kevinowocki/Sites/gitcoin/web~ % !time      (git)-[kevin/profile_speed_2] :
time curl "http://localhost:8000/profile/owocki" > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 69145  100 69145    0     0   103k      0 --:--:-- --:--:-- --:--:--  103k
curl "http://localhost:8000/profile/owocki" > /dev/null  0.01s user 0.01s system 2% cpu 0.666 total

with a cold cache:

BEFORE THIS CHANGE:

kevinowocki@local /Users/kevinowocki/Sites/gitcoin/web~ % time curl "http://localhost:8000/profile/owocki" > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 69145  100 69145    0     0  10760      0  0:00:06  0:00:06 --:--:-- 16423
curl "http://localhost:8000/profile/owocki" > /dev/null  0.01s user 0.02s system 0% cpu 6.459 total

AFTER THIS CHANGE:

kevinowocki@local /Users/kevinowocki/Sites/gitcoin/web~ % time curl "http://localhost:8000/profile/owocki" > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 69145  100 69145    0     0  20877      0  0:00:03  0:00:03 --:--:-- 20883
curl "http://localhost:8000/profile/owocki" > /dev/null  0.01s user 0.02s system 0% cpu 3.342 total

@codecov
Copy link

codecov bot commented Jul 9, 2019

Codecov Report

Merging #4760 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4760      +/-   ##
==========================================
- Coverage   30.41%   30.41%   -0.01%     
==========================================
  Files         216      216              
  Lines       17240    17224      -16     
  Branches     2335     2332       -3     
==========================================
- Hits         5244     5239       -5     
+ Misses      11788    11777      -11     
  Partials      208      208
Impacted Files Coverage Δ
app/dashboard/views.py 14.35% <0%> (-0.1%) ⬇️
app/retail/emails.py 22.33% <0%> (ø) ⬆️
app/dashboard/models.py 55.68% <0%> (+0.03%) ⬆️
app/dashboard/router.py 32.7% <0%> (+0.44%) ⬆️
app/dashboard/admin.py 65.55% <0%> (+2.06%) ⬆️

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 bc68c7a...584d3e8. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 9, 2019

Codecov Report

Merging #4760 into master will increase coverage by 0.49%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4760      +/-   ##
==========================================
+ Coverage   30.41%   30.91%   +0.49%     
==========================================
  Files         216      216              
  Lines       17240    18247    +1007     
  Branches     2335     2636     +301     
==========================================
+ Hits         5244     5641     +397     
- Misses      11788    12353     +565     
- Partials      208      253      +45
Impacted Files Coverage Δ
app/dashboard/views.py 15.82% <0%> (+1.37%) ⬆️
app/retail/emails.py 22.29% <0%> (-0.04%) ⬇️
app/dashboard/models.py 56.54% <0%> (+0.9%) ⬆️
app/dashboard/router.py 36.9% <0%> (+4.65%) ⬆️
app/retail/views.py 34.12% <0%> (+4.86%) ⬆️
app/dashboard/admin.py 72.36% <0%> (+8.87%) ⬆️

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 bc68c7a...8da8f25. Read the comment docs.

danlipert
danlipert previously approved these changes Jul 10, 2019
@owocki owocki merged commit 73fe2b2 into master Jul 11, 2019
@thelostone-mc thelostone-mc deleted the kevin/profile_speed_2 branch June 27, 2020 00:48
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