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

(refactor) throttle foldCheck instead of debounce #45

Merged
merged 6 commits into from
Sep 17, 2017
Merged

Conversation

potench
Copy link
Contributor

@potench potench commented Sep 15, 2017

(refactor) throttle foldCheck for viewability during scrolling instead of debounce

fixes #44

Goal:

  1. Checks viewability immediately on scroll, throttles for 20 ms, checks viewability on scroll.
  2. Reduces latency of checking viewability on scroll.

@codecov
Copy link

codecov bot commented Sep 15, 2017

Codecov Report

Merging #45 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
+ Coverage   93.04%   93.05%   +0.01%     
==========================================
  Files           8        8              
  Lines         575      576       +1     
==========================================
+ Hits          535      536       +1     
  Misses         40       40
Impacted Files Coverage Δ
src/createManager.js 92.3% <100%> (+0.03%) ⬆️

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 7481c4d...2e00c1c. Read the comment docs.

@codecov
Copy link

codecov bot commented Sep 15, 2017

Codecov Report

Merging #45 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #45      +/-   ##
==========================================
+ Coverage   93.04%   93.07%   +0.03%     
==========================================
  Files           8        8              
  Lines         575      578       +3     
==========================================
+ Hits          535      538       +3     
  Misses         40       40
Impacted Files Coverage Δ
src/createManager.js 92.37% <100%> (+0.1%) ⬆️

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 ee26b0e...597b697. Read the comment docs.

@potench
Copy link
Contributor Author

potench commented Sep 15, 2017

Changes Planned:
According to https://bundlephobia.com/result?p=debounce@1.0.2 lodash.debounce and lodash.throttle add 4kb in dependencies while debounce is only 400b.

Going to replace both with smaller libraries

@potench potench merged commit 7130060 into master Sep 17, 2017
@potench potench deleted the issue/44 branch September 18, 2017 18:37
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.

Viewability causes ads to only render when scrolling is completely stopped
2 participants