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

Create OkHttp on background thread during initialization #1677

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

fractalwrench
Copy link
Contributor

Goal

The SDK instantiates OkHttp on the main thread which hit perf. We should load it on a background thread instead.

baseline Screenshot 2024-11-14 at 13 06 26

@fractalwrench fractalwrench requested a review from a team as a code owner November 14, 2024 13:14
Copy link
Contributor

@priettt priettt left a comment

Choose a reason for hiding this comment

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

good catch 🙌

Use correct endpoint for spans + logs
@fractalwrench fractalwrench merged commit 1311fea into simplify-behavior-remote-cfg Nov 14, 2024
2 of 3 checks passed
@fractalwrench fractalwrench deleted the config-perf-optimization branch November 14, 2024 16:53
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

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

Project coverage is 84.16%. Comparing base (35e8b52) to head (6f2ad41).

Files with missing lines Patch % Lines
.../embracesdk/internal/injection/ConfigModuleImpl.kt 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                       Coverage Diff                        @@
##           simplify-behavior-remote-cfg    #1677      +/-   ##
================================================================
+ Coverage                         84.14%   84.16%   +0.02%     
================================================================
  Files                               456      456              
  Lines                             10624    10625       +1     
  Branches                           1603     1603              
================================================================
+ Hits                               8940     8943       +3     
+ Misses                              947      945       -2     
  Partials                            737      737              
Files with missing lines Coverage Δ
...racesdk/internal/comms/api/EmbraceApiUrlBuilder.kt 94.11% <100.00%> (ø)
...ternal/config/source/CombinedRemoteConfigSource.kt 90.00% <100.00%> (ø)
.../embracesdk/internal/injection/ConfigModuleImpl.kt 84.44% <87.50%> (+0.35%) ⬆️

... and 1 file with indirect coverage changes

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.

2 participants