-
Notifications
You must be signed in to change notification settings - Fork 453
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
Performance: JsonHttpContent.writeTo() is called twice for each HttpRequest #283
Comments
@siom79 , @ajaaym This is not either a bug and a feature. I don't think that a code change is required for this request. That code of the method public long getLength() throws IOException works as expected. It calls the second method only once when contentLength is -1. |
@siom79, @ajaaym , @sduskis Please ignore my comment above. google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java Line 1012 in 8217035
google-http-java-client/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java Line 1076 in 8217035
|
@ejona86, @JustinBeckwith is the feature request still actual? by the log above I'm not clear about. |
@andrey-qlogic, yo usaw that the code gets called twice. We should fix that. |
I think #910 fixed this. Reopen if not. |
Debugging shows that the method
JsonHttpContent.writeTo()
is called twice when a HttpRequest is rendered. For the first time it is called to compute the length of the body and for the second time to actually render the JSON string.First invocation:
Second invocation:
The text was updated successfully, but these errors were encountered: