RUM-10347: Avoid polling for RumContext in VitalReaderRunnable#2728
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## nogorodnikov/rum-8170/feature-context-sync #2728 +/- ##
==============================================================================
+ Coverage 69.78% 69.87% +0.10%
==============================================================================
Files 824 824
Lines 30940 30947 +7
Branches 5190 5190
==============================================================================
+ Hits 21589 21624 +35
+ Misses 7874 7859 -15
+ Partials 1477 1464 -13
🚀 New features to boost your workflow:
|
aleksandr-gringauz
approved these changes
Jun 16, 2025
ambushwork
approved these changes
Jun 16, 2025
0xnm
merged commit Jun 16, 2025
97821b7
into
nogorodnikov/rum-8170/feature-context-sync
24 checks passed
0xnm
deleted the
nogorodnikov/rum-10347/avoid-polling-for-rumcontext-in-vital-runnable
branch
June 16, 2025 16:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
VitalReaderRunnablecurrently callsgetFeatureContextto check ifRumContexthasFOREGROUNDtype.The problem is that these calls may happen quite often, like every 100ms, putting some pressure on the context thread and feature context locking mechanism.
This PR switches to another approach:
VitalReaderRunnablewill just listen for theRumContextupdates, this should remove the performance pressure.Review checklist (to be filled by reviewers)