RUM-16592: Remove regex usage in the MemoryVitalReader#3499
Merged
0xnm merged 1 commit intoJun 3, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
jonathanmos
previously approved these changes
Jun 3, 2026
0xnm
force-pushed
the
nogorodnikov/rum-16592/avoid-using-regex-in-memoryvitalreader
branch
from
June 3, 2026 07:55
742e54e to
618fea2
Compare
jonathanmos
approved these changes
Jun 3, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3499 +/- ##
===========================================
- Coverage 72.23% 72.18% -0.06%
===========================================
Files 965 965
Lines 35595 35596 +1
Branches 5932 5935 +3
===========================================
- Hits 25712 25692 -20
- Misses 8274 8286 +12
- Partials 1609 1618 +9
🚀 New features to boost your workflow:
|
0xnm
deleted the
nogorodnikov/rum-16592/avoid-using-regex-in-memoryvitalreader
branch
June 3, 2026 08:55
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?
This PR removes regex usage in the
MemoryVitalReader, see #3498 for the original suggestion.The performance gain is ~4x (3364 ns/op before vs 814 ns/op after).
Note: it seems that Linux kernel always uses
kBas a unit in the/proc/[pid]/statusfile.https://github.com/torvalds/linux/blob/ba3e43a9e601636f5edb54e259a74f96ca3b8fd8/fs/proc/task_mmu.c#L65-L85
See also https://docs.kernel.org/filesystems/proc.html for the
procFS description.Fixes #3498.
Review checklist (to be filled by reviewers)