-
Notifications
You must be signed in to change notification settings - Fork 248
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
Support sending gzipped request body when uploading #2004
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR @omarismail94 . Left a few comments.
engine/src/main/java/com/google/android/fhir/FhirEngineProvider.kt
Outdated
Show resolved
Hide resolved
engine/src/main/java/com/google/android/fhir/sync/remote/GzipUploadInterceptor.kt
Show resolved
Hide resolved
engine/src/main/java/com/google/android/fhir/sync/remote/RetrofitHttpService.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR thanks omar!
if you can, please also test on gcp, and if possible, azure, ibm, firely. and knowing the default behavious of all these servers will help us make an informed decision on the default value of the new network config.
engine/src/main/java/com/google/android/fhir/sync/remote/RetrofitHttpService.kt
Outdated
Show resolved
Hide resolved
engine/src/main/java/com/google/android/fhir/sync/remote/GzipUploadInterceptor.kt
Outdated
Show resolved
Hide resolved
engine/src/main/java/com/google/android/fhir/sync/remote/GzipUploadInterceptor.kt
Outdated
Show resolved
Hide resolved
engine/src/main/java/com/google/android/fhir/sync/remote/GzipUploadInterceptor.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great PR thanks omar!
if you can, please also test on gcp, and if possible, azure, ibm, firely. and knowing the default behavious of all these servers will help us make an informed decision on the default value of the new network config.
@aditya-07 @jingtang10 resolved all comments |
I re-ran the benchmark to see how adding content-length influences the time taken to upload and plotted the results below. Yes, it does increase at a faster rate as more data is compressed, but I think for now, this is OK. Even if we do upgrade to the OkHttp library that adds the content length for us, it does so in the same way we do, so we would face the same issue. The alternative is to have the gzip interceptor after the HttpLoggingInterceptor, however, that would mean the LoggingInterceptor would be printing the content-length of the uncompressed request |
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #1988
Description
Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Builds | Releases | Other)
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.