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

RUM-6286: replacing joinToString when it possible, refactor a bit #2456

Merged
merged 9 commits into from
Dec 18, 2024

Conversation

satween
Copy link
Contributor

@satween satween commented Dec 16, 2024

What does this PR do?

Here we're trying to reduce usages of joinToString method inside the project, replacing it with more performant string builder

Motivation

Using joinToString may cause a lot of memory and cpu consumption which we trying to avoid, minimizing impact of sdk to user's code

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@satween satween force-pushed the tvaleev/rum-6286/join-to-string-optimizations branch from ece50e3 to 39353fd Compare December 17, 2024 12:20
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.95%. Comparing base (f9bc2b5) to head (b2a6eae).
Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
...droid/core/internal/data/upload/CurlInterceptor.kt 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2456      +/-   ##
===========================================
- Coverage    69.99%   69.95%   -0.04%     
===========================================
  Files          785      786       +1     
  Lines        29278    29279       +1     
  Branches      4884     4886       +2     
===========================================
- Hits         20491    20480      -11     
- Misses        7430     7441      +11     
- Partials      1357     1358       +1     
Files with missing lines Coverage Δ
.../android/error/internal/DatadogExceptionHandler.kt 87.67% <100.00%> (-0.17%) ⬇️
...datadog/android/internal/utils/StringBuilderExt.kt 100.00% <100.00%> (ø)
...g/android/rum/internal/DatadogLateCrashReporter.kt 85.88% <ø> (+1.13%) ⬆️
...dog/android/rum/internal/anr/AndroidTraceParser.kt 92.45% <100.00%> (ø)
...adog/android/rum/internal/net/RumRequestFactory.kt 69.32% <100.00%> (+3.03%) ⬆️
...droid/core/internal/data/upload/CurlInterceptor.kt 82.35% <85.71%> (-2.26%) ⬇️

... and 26 files with indirect coverage changes

@satween satween marked this pull request as ready for review December 17, 2024 14:13
@satween satween requested review from a team as code owners December 17, 2024 14:13
@satween satween requested a review from xgouchet December 17, 2024 14:17
@satween satween force-pushed the tvaleev/rum-6286/join-to-string-optimizations branch from 77c4ba7 to b03562c Compare December 17, 2024 17:07
Copy link
Member

@0xnm 0xnm left a comment

Choose a reason for hiding this comment

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

I left few comments/suggestions. The only blocker for me is having new extension method in the core module instead of internal.

@satween satween force-pushed the tvaleev/rum-6286/join-to-string-optimizations branch from b03562c to 55518a7 Compare December 18, 2024 10:25
@satween satween requested a review from 0xnm December 18, 2024 11:14
@satween satween force-pushed the tvaleev/rum-6286/join-to-string-optimizations branch from 92867f7 to f4159a6 Compare December 18, 2024 13:20
@satween satween force-pushed the tvaleev/rum-6286/join-to-string-optimizations branch from 2255594 to 2261b18 Compare December 18, 2024 14:48
@satween satween force-pushed the tvaleev/rum-6286/join-to-string-optimizations branch from 2261b18 to b2a6eae Compare December 18, 2024 14:50
@satween satween merged commit df15ef6 into develop Dec 18, 2024
24 checks passed
@satween satween deleted the tvaleev/rum-6286/join-to-string-optimizations branch December 18, 2024 15:48
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