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

⚡️ [RUMF-767] start mutation observer only when needed #858

Merged
merged 23 commits into from
Jun 1, 2021

Conversation

amortemousque
Copy link
Contributor

@amortemousque amortemousque commented May 19, 2021

Motivation

Start MutationObserver only when needed for performance optimization

Changes

  • start DOM Mutation observation only when we need to track the page activities

Testing

Unit, local


I have gone over the contributing documentation.

@amortemousque amortemousque requested a review from a team as a code owner May 19, 2021 15:41
@amortemousque amortemousque force-pushed the aymeric/start-mutation-observer-only-when-needed branch 2 times, most recently from 9d25946 to 0841bdd Compare May 19, 2021 15:46
@amortemousque amortemousque force-pushed the aymeric/start-mutation-observer-only-when-needed branch from 0b7efb9 to 4122695 Compare May 20, 2021 15:05
@codecov-commenter
Copy link

codecov-commenter commented May 20, 2021

Codecov Report

Merging #858 (7f78f66) into main (cbc6064) will decrease coverage by 0.03%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #858      +/-   ##
==========================================
- Coverage   88.62%   88.58%   -0.04%     
==========================================
  Files          80       80              
  Lines        3656     3671      +15     
  Branches      809      812       +3     
==========================================
+ Hits         3240     3252      +12     
- Misses        416      419       +3     
Impacted Files Coverage Δ
packages/rum-core/src/boot/rum.ts 29.16% <0.00%> (ø)
packages/rum-core/src/domain/lifeCycle.ts 100.00% <ø> (ø)
...ain/rumEventsCollection/action/actionCollection.ts 94.11% <50.00%> (ø)
...ages/rum-core/src/browser/domMutationObservable.ts 87.50% <91.66%> (ø)
packages/core/src/tools/observable.ts 100.00% <100.00%> (ø)
.../domain/rumEventsCollection/action/trackActions.ts 97.87% <100.00%> (ø)
...omain/rumEventsCollection/view/trackViewMetrics.ts 100.00% <100.00%> (ø)
.../src/domain/rumEventsCollection/view/trackViews.ts 97.77% <100.00%> (ø)
.../domain/rumEventsCollection/view/viewCollection.ts 100.00% <100.00%> (ø)
...ackages/rum-core/src/domain/trackPageActivities.ts 100.00% <100.00%> (ø)
... and 1 more

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 cbc6064...7f78f66. Read the comment docs.

@amortemousque amortemousque force-pushed the aymeric/start-mutation-observer-only-when-needed branch from fb92d97 to 107ac9c Compare May 28, 2021 10:51
@amortemousque amortemousque merged commit 15ad401 into main Jun 1, 2021
@amortemousque amortemousque deleted the aymeric/start-mutation-observer-only-when-needed branch June 7, 2021 15:44
@bcaudan bcaudan changed the title ⚡️ start mutation observer only when needed ⚡️ [RUMF-767] start mutation observer only when needed Dec 6, 2021
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.

4 participants