Skip to content

Throttle intersection observer posts to 10 per second.#1889

Merged
cramforce merged 1 commit intoampproject:masterfrom
cramforce:throttle-intersection-observer
Feb 10, 2016
Merged

Throttle intersection observer posts to 10 per second.#1889
cramforce merged 1 commit intoampproject:masterfrom
cramforce:throttle-intersection-observer

Conversation

@cramforce
Copy link
Copy Markdown
Member

Also filters out changes that happen in the same milli seconds.
Deletes the amp-iframe intersection tests because they are super bad and I already filed #1822 to rewrite them.

Also filters out changes that happen in the same milli seconds.
Deletes the `amp-iframe` intersection tests because they are super bad and I already filed ampproject#1822 to rewrite them.
/** @private {boolean} */
this.shouldSendIntersectionChanges_ = false;
/** @private {Array<function>} */
this.unlisteners_ = [];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No longer need to unlisten?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This code was never used. If we want to kill entire ad tags, we'd need to add this again.

@dvoytenko
Copy link
Copy Markdown
Contributor

LGTM. One question that can be answered post-merge.

cramforce added a commit that referenced this pull request Feb 10, 2016
Throttle intersection observer posts to 10 per second.
@cramforce cramforce merged commit 5cde679 into ampproject:master Feb 10, 2016
@cramforce cramforce deleted the throttle-intersection-observer branch February 10, 2016 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants